We have a worklfow that allows transitions from 1 status (Blocked) back to 4 other status (QE, Ready for QE, Development, UAT). The workflow need to check that when the status is changed from Blocked to one of the 4 statuses it goes back to the original status only. (Example: Development ---> Blocked ---> Development)
What is the best way to do this?
So far, using boolean as a condition has not worked. Getting syntax errors and not able to debug.
Thank you for your help.
We were successful in using JMWE to write a validator to check the current, last status from and last status to in order to check if the user was returning to the correct status. The groovy script is in every status that can use the Block status in the workflow.
You can use the Previous Status Condition to each transition in your workflow, so it will ensure that the last status that your issue was transitioned from is the same that it's being moved to.
To do this, you must perform the steps below:
- Navigate to your project > Project settings > Workflows
- Click to edit your workflow
- Click on the transition that comes from the status Blocked to Development > Click on Conditions > Add the Previous Status Condition
- Ensure that the previous status of the issue was Development to allow this transition
- Repeat the same steps for:
Blocked to QE
Blocked to Ready for QE
Blocked to UAT
- Publish your Workflow
P.S: When configuring the Condition, don't forget to flag the option to apply the condition only for the previous status of the issue.
Thank you for the reply.
I am on JIRA 7.84 and have JSU. I do not see Previous Status Condition in the condition list page. Is this a plug-in or a built-in feature of JIRA?
Below is a list conditions available.
Thank you for your help.
A field is/isn't initialized
Boolean condition with math, date-time or text-string terms
Cascading select comparer
Check project property
Code Committed Condition
Compare two parsed texts
Complete session condition
Condition based on JQL query
Condition based on regular expression
Condition on a list of issue keys
Condition on linked issues
Condition on subtasks
Except users in a field
Hide transition from user
No Open Reviews Condition
Only Assignee Condition
Only Reporter Condition
Only users in a field
Sub-Task Blocking Condition
Transition is triggered by Bulk Operation
Transition is triggered by Jira Workflow Toolbox post-function
Unreviewed Code Condition
User Is In Any Groups (JSU)
User Is In Any Roles (JSU)
User Is In Custom Field (JSU)
User Is In Group
User Is In Group Custom Field
User Is In Project Role
User is not in project role
Users in a field are/aren't in a project role
Value Field (JSU)
Thank for the JSU suggestion. This is what I have so far:
I set up a custom field called "Prior Status-Blocked".
In the transition from To-Do to Development I used the post condition of "Copy Value from Other Field" with no precondition, copying Status to Prior Status-Blocked.
In the transition from Blocked to Development, I set up a condition for Prior Status-Blocked = Development. When I test, the other 3 statuses show up but not Development.
Other versions are not working either. I am not able to obtain other plug-ins. I am also not able to upload screen shots.
Any suggestions are appreciated.
Sounds like you're on the right track. Depending upon where your post function is in the order of things, you may be copying "To-Do" rather than "Development" into "Prior Status-Blocked". You'll want to place your post function after the step of "Update change history for an issue and store the issue in the database."
Alternatively, put the post function on the transitions leading to blocked (which is what we do), and put your post function first in the list, while the value of "status" still contains the old value, before it gets set to "blocked".
Hope this helps.
I continue to work on setting up the logic on the workflow. I did not have any success using JSU, so I downloaded JMWE. The previous condition works for the validation of the flow back from blocked to development, ready for QE, QE, etc, but it prevents the forward flow.
The forward flow is Development, Code Review, Ready for QE, QE, etc.
Each of the forward flow statuses can also go back to the previous status too.
Now looking at how to combine Previous Condition logic with Current Status logic.
Any insight is appreciated.
Thank you so much.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events