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()



...

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

     Hide the transition "In Progress" on an issue until it has at least 1 subtask under it

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

      Select causes under Issue Link
    • Add the condition