Hello,
We need to have the ability to prevent a Story to be set to "Done" when a Bug is blocking the story and it is still open as well.
Is there any way to set this by using the automation rules? I have tried but without success.
This is the workflow the Story issue type has configured in our jira instance:
Basically, what we need is to satisfy the following criteria:
IF
issue type = "Story" AND status is not "Done",
AND issue link type is "blocked by" (preferably a "Bug") AND status of linked issue is not "Done",
THEN
issue type = "Story" cannot be moved to "Done"
Could you please tell me if this is technically feasible or do we need to use another feature?
Many thanks!
Victoria.
Hello Najm @Najm Polaris , Patricia @Patricia Francezi!
Thank you for your support. I finally found the solution that it works for our scenario.
Here it is:
Regards,
Victoria.
Hi @mvmtori
Good you had your problem solved.
I would like to add again, that this solution dont prevent the status to be changed.
Your question was about preventing it.
Your solution is good and serves you, but for the ones who find your accepted answer may seen that the full scenario was achived.
You are just moving the status from another one if the condition is not match. Not preventing it to happen.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patricia Francezi Patricia!
In my case, it does prevent it. If i move a story from any status to "Done" (or any status defined in the group of "closed" issues), if the story has a bug blocking the story and that bug isn't resolved yet, the story goes back to the status defined (in my case, to "Waiting" as that is the most representative status we have to say to the JIRA user, the Story is waiting until de defect is no longer blocking it).
Thank you for all your feedback and comments!
Victoria.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mvmtori
The workflow conditions has the linked issues as a field we can compare string to block the transition,, BUT i couldnt find any use case to know how to configure it.
Another solution I thought about
- Create a hidden field (like a check box) that is checked when the issue is linked to a blocks using automation
- WHen all blocker issues are close, edit this field and clear it. (here is an answer for this scenario - my question and the answer feets for your purpose https://community.atlassian.com/t5/Jira-Software-questions/Help-with-a-linked-issue-rule-please/qaq-p/2295972#M255069 )
- In the workflow create a condition for done transition checking this field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mvmtori
Let me clarify my steps, and add some information
To prevent the issue to move to done, you need to configure your workflow to prevent it.
Just the automation rule is not enough to prevent your scenario.
Then
1) You need to create hidden field to store the fact that the issue had a linked issue that blocks it.
In case you prefer create a custom field, lets say you name it "Blockers", as a checkbox field type
https://support.atlassian.com/jira-cloud-administration/docs/create-a-custom-field/
During custom field creation, it will request to associate to the screens in the projects you want it to be shown .
If you want more information about screens here is the kb
https://support.atlassian.com/jira-cloud-administration/docs/configure-issue-screens/
You also need to hide the field from the users so they cant change the value mannually
1.1) OR - you can use the flag field that is already used to show impedment on Jira boards. This will sufice.
In this case you already have the field in the project and its screens and dont need one more.
The caveat for this is that the users can take the flag off the issues mannually.
2) You need an automation to set this field or set the flag on in the issue like this one
The same rule can be used to set the custom field you created - i suggested the same type of fields.
3) Now you have to configure your workflow to prevent the done status to be shown to the user if there the field is still filled up (the custom one or the flag)
More info in to how to get to the transition condition configuration on your workflow
You are going to use "Value Field" condition, and the screen should be filled linke this
Then add and publish the draft workflow.
4) You will need a rule to take of the flag or the custom field, when all the blockers issues are closed.
And this you can get from this answer here
I hope this helps.
And - for that complex rules and scenarios I also reccomend you to use free courses in Atlassian University, so you will know more about the features in Jira platform for you own good.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Patricia Francezi Thank you for the detailed solution. It is absolutely brilliant.
@mvmtori You should try her detailed solution it should work. I have created a demo for my automation just for help here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mvmtori
you can do it using automation as seen below but just add your first condition about the ticket being a user story and not in done by using the if condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Najm Polaris Najm!
I tried this other rule but it is not working either :( - Can you please advise whether is something wrong in the rule?
Many thanks in advance!
Victoria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mvmtori ,
Your second condition was wrong, instead of using "is blocked by" you used "blocks". I have simplified the automation try this one below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To add information on the rule provided by @Najm Polaris
If i understood your scenario, you want to prevent /block the transition to done if there are blocker issues.
Automation does not prevent a transition to happen.
If you want to prevent, you need to use conditions or validators as i mentioned in my answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Najm @Najm Polaris , Patricia @Patricia Francezi
Thank you very much for replying to my questions.
I tried to combine both answers provided by you, I tried so many different combinations but unfortunately none of them worked.
This is the last one I used:
I am probably missing something you Patricia explained to me that I didn't understand.
I truly appreciate if you can take at look and see what might be wrong.
I can still move the story to DONE, even when it has open bugs blocking the story =(
Regards,
Victoria.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.