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
...
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:
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 title Steps - Add the
Related Issue condition
to the Create transition. Select
SelectIssues linked to Sub-tasks of the current issue through the following link type
option option underWhich issue(s)
causes
underIssue Link
- Add the condition
- Add the