-
This can be done via custom groovy script. To do it:
- Switch to
Administration / Groovy Scriptsand define a groovy script sayMilestones, with below content:
import io.onedev.server.model.Project def choices = [:] for (milestone in Project.get().milestones) { if (milestone.closed) choices[milestone.name] = "green" else choices[milestone.name] = "yellow" } return choices- Now define your custom issue field
Affected Version, specifyAvailable ChoicesasEvaluate script to get choices, and select scriptMilestonescreated above
- Switch to
-
A minor error in the script. Please use color code instead of name like below:
import io.onedev.server.model.Project def choices = [:] for (milestone in Project.get().milestones) { if (milestone.closed) choices[milestone.name] = "#00ff00" else choices[milestone.name] = "#ffff00" } return choices -
A built-in issue field type will also be added in next minor release
-
OneDev
changed state to 'Closed' 4 years ago
Previous Value Current Value Open
Closed
-
OneDev
changed state to 'Released' 4 years ago
Previous Value Current Value Closed
Released
-
State changed as build #2278 is successful
-
This can be done via custom groovy script.
That's interesting. Did not know that. Thanks for the tip. And many thanks for the new field type in 6.3.3 😀
| Type |
New Feature
|
| Priority |
Normal
|
| Assignee |
Issue Votes (0)
It would be great to have a field type for "milestone".
This would allow selecting milestones in a "Affected Version" field.