Abstract
This code snippet sets a Versions field of an issue to the earliest unreleased version scheduled after a certain date
Logic
Access the available versions for the issue and filter the next unreleased version scheduled nearest to a specific date
Snippet
Code Block | ||||
---|---|---|---|---|
| ||||
def version issue.getAvailableOptions("versions").each{ if(!it.isReleased() && it.getReleaseDate() >= issue.get("duedate<Specific date>") && (version?.getReleaseDate() == null || version.getReleaseDate() > it.getReleaseDate())) { version = it } } version?.getName() |
...