Hello,
I would like to know if it is possible to do the following:
I have a US in progress, which is blocking a second US from being done.
When I want to move the second US from “to be done” to “in progress,” I would like it to remain in “to be done” until the first one is finished, because it is blocking the second one from being moved to “in progress.”
The second US can only be moved to in progress once the first one is completed .
The idea is to use linked issues, but I don't know if Jira is capable of doing this either through automation or workflow rules.
If you have any information, I'd love to hear it. Thank you very much for your help.
I think there are 2 ways we can give it a try:
1. Workflow Conditions
What to do:
Edit your workflow for the second US (the one that’s blocked).
On the transition from “To Be Done” to “In Progress,” add a Condition that checks if any linked issues of type “blocks” (or “is blocked by”) are not in the “Done” status.
If such a link exists and the blocking issue isn’t done, the transition will be hidden or blocked.
How to set it up:
Out-of-the-box Jira Cloud doesn’t have a built-in condition for “linked issue status,” but you can add this with marketplace apps like:
With these apps, you can add a condition like:
“Only allow transition if all issues linked as ‘is blocked by’ are in status = Done.”
Example with JMWE:
Add a “Linked Issues Status Condition” to the transition.
Configure it to check that all issues linked as “is blocked by” are in the “Done” status.
2. Automation (Workaround, Not a True Block)
If you don’t have workflow apps, you can use Jira Automation to “bounce back” issues that are moved incorrectly:
Trigger: Issue transitioned from “To Be Done” to “In Progress”
Condition: If the issue has a linked issue of type “is blocked by” that is NOT in “Done”
Action: Transition the issue back to “To Be Done” and optionally add a comment explaining why.
This doesn’t prevent the transition, but it does automatically undo it and notify the user.
Hi Wakil,
You can't keep something from transitioning in the workflow from Automation rules. You could possibly create a custom field and then not show the field on the screen. Then add a validator to the transition to In Progress to not let it move if the value of the field is not set. Then you can add a custom message to the Validator that the linked ticket must be finished first.
Then when the linked ticket moves to done, you can have an automation rule that sets the value of the field for the linked ticket so that it can then be move.
Just a note that you might have to set the initial value of the field for the first US so that it can move.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Waki,
If you have ScriptRunner for Jira Cloud installed then you could use a workflow condition to block the transition of the work item when its linked item is not in the done status.
Workflow conditions use the Jira Expression framework which is documented here and you can use this documentation to see how to create the expresison you require.
We also have some examples in the dcoumentation here around using linked issues, which you can use as a reference guide.
If you need further help creating the expression, then you can raise a support request here and the ScriptRunner support team can help with this.
I hope this helps.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.