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:
Disable a global transition from certain statuses
Expand title Steps 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.
- Add the
Previous Status Condition
...
Only the Reporter of the issue should be able to close the issue.
Expand title Steps - Add the
Scripted (Groovy) condition
to the Close issue transition. Write this content in the
Groovy script.
Code Block currentUser.equals(issue.get("reporter"))
- Add the
Hide the transition from the current user if he does not belong to the Approvers
Expand title Steps - 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()}
- Add the
Block the transition when the Time to resolution is breached.
Expand title Steps - 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()
- Add the
...