Versions Compared

Key

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

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

On this page:

Table of Contents


Current Status Condition

This condition can be used to hide/show a particular transition from the list of available workflow actions, based on the current status of the issue. 

Sample use cases:

  • (lightbulb) Disable a global transition from certain statuses

    Expand
    titleSteps


    Panel
    • Add the Current status condition to the transition.
    • Select the statuses from which the Global transition should be disabled from the Current Status field.



Previous Status Condition

...

  • (lightbulb) Only the Reporter of the issue should be able to close the issue. 

    Expand
    titleSteps
    • Add the Scripted (Groovy) condition to the Close issue transition.
    • Write this content in the Groovy script.

      Code Block
      currentUser.equals(issue.get("reporter"))



  • (lightbulb) Hide the transition from the current user if he does not belong to the Approvers

    Expand
    titleSteps
    • Add the Scripted (Groovy) condition to the transition you wish to hide
    • Write this content in the Groovy script.

      Code Block
      issue.get("Approvers").any {
        it.getName() == currentUser.getName()}



  • (lightbulb) Block the transition when the Time to resolution is breached.

    Expand
    titleSteps
    • Add the Scripted (Groovy) condition to the transition you wish to hide
    • Write this content in the Groovy script.

      Code Block
      issue.getAsJsonData("Time to resolution").getData()?.getOngoingCycle()?.getBreached()



Linked

Related Issues Status Condition

This condition can be used to hide/show a particular transition from the list of available transitions, based on the status of the issue's linked related issues. 

Sample use cases:

  • (lightbulb) Hide the "Close" transition of the Epic until all its Stories are closed.

    Expand
    titleSteps
    • Add the Linked Issue Related Issues Status condition to the Close transition.
    • Select is Epic of as the Issue Linkcurrent issue in Which Issue(s)

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


Related Issues Condition

This condition can be used to hide/show a particular transition from the list of available transitions, based on the issue's related issues. 

Sample use cases:

  • (lightbulb) Block the creation of the Bug if at least one issue with causes link type is not linked to it during the transition

    Expand
    titleSteps
    • Add the Related Issue condition to the Create transition.
    • Select Issues linked to the current issue through the following link type option under Which issue(s)

    • Select causes under Issue Link