Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Abstract

This code snippet finds the earliest unreleased version scheduled after a certain date

Logic

Access the available versions for the issue and finds the earliest unreleased version scheduled after a certain date

Snippet

Code Block
languagejs
linenumberstrue
def version
issue.getAvailableOptions("versions").each{
  if(!it.isReleased() && it.getReleaseDate() >= issue.get("<Specific date>") && (version?.getReleaseDate() == null || version.getReleaseDate() > it.getReleaseDate())) 
  {
    version = it
  }
}
version?.getName()

...

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "jmwe-groovy" and type = "page" and space = "KBJMWE"
labelsjmwe-nunjucks jmwe-cloud

...