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
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:
Hide the "Close" transition of the Epic until all its Stories are closed.
Expand title Steps - Add the
Linked Issue Related Issues Status condition
to theClose
transition. Select
is Epic of
asthe
Issue Link
current issue
inWhich Issue(s)
- Select the statuses the linked issues must be in from
Statuses
- Add the
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:
Block the creation of the Bug if at least one issue with causes link type is not linked to it during the transition
Expand title Steps - Add the
Related Issue condition
to the Create transition. Select
Issues linked to the current issue through the following link type
option underWhich issue(s)
- Select
causes
underIssue Link
- Add the