Versions Compared

Key

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

This section has use cases which help you in understand the usage of Validators provided by JMWE.

...

Expand
titleSteps
  • Add the Scripted (Groovy) validator to the Create transition.

  • Write the following in the Groovy script

    Code Block
    languagegroovy
    try {
      return issue.get("issuetype").name != "Bug" && issue.getModifiedFields()?.get("attachment")?.getNewValue()?.size() > 0
    } catch (Exception e) {
      return false
    }

(lightbulb) Validate the Cascade select for values in parent and child select dropdowns

Expand
titleSteps
  • Add the Scripted (Groovy) validator to the transition.

  • Write the following in the Groovy script

    Code Block
    languagegroovy
     issue.get("Cascade")?.get(null) != null && issue.get("Cascade")?.get("1") != null

...

Related Issues Status validator

This validator ensures that the current issue's related issues (such as linked issues, Stories of an Epic, Epic of a Story, subtasks of an issue, issues returned by a Groovy script or a JQL search, etc.) are in one of the specified statuses.

Sample use cases:

(lightbulb) Block the transition of the Epic to Closed status, if its stories aren't closed.

Expand
titleSteps
  • Add the Related issues status validator to the Close transition.

  • Select the issue link type Epic of the current issue from Which Issue(s) field.

  • Select the statuses the linked issues must be in, from Statuses

  • Add the error message, "The Stories of the Epic are not yet resolved"

Related Issue(s) validator

This validator ensures that a link to one (or more) issue(s) from the current issue is being created during the transition, and/or that existing and/or newly related issues (such as linked issues, Stories of an Epic, Epic of a Story, subtasks of an issue, issues returned by a Groovy script or a JQL search, etc.) have certain characteristics.

...