Hello everyone! I need help creating an automation in Jira that won't let me change a task to Done while there are issues linked to it set to "is blocked by".
Hi Emerson,
While you might be able to get something to work for this using an automation, I'm not sure an automation is the best task at least not for the actual preventing of the transition. An automation happens after a trigger (or by a schedule, but that's not relevant here), so it would have to occur after a user already thinks its happened, walking an issue backwards from where it went, which can be confusing to the user and could have other complications depending on your workflow.
I would recommend the approach of using a workflow validation on the transition(s) that go to done if possible. This will prevent the transition from even happening so the users aren't confused.
The only problem, is that natively I'm not sure there's a way to identify that the "is blocked by" - at least not directly. Some kind of scripted field would be ideal if you have ScriptRunner or something like that on your instance, if not we may be able to use some automations to update a boolean/checkbox field to use for the validation. Of course, these may use your monthly automation allotment if they are global, but you could create a checkbox field to update with an automation every time the ticket is updated or closed so be mindful.
Let's assume you don't have a means of scripting. You would do something like this
I understand your idea and I will test it here to see if it works.
Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem @Emerson Silva , I haven't tested fully so might need some tweaking but the basic idea is there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you mentioned is not feasible with Jira Automation, but instead, you can use the Block parent issue workflow based on a sub-task status in your Workflow condition.
I hope this helps!
Best regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This will work in some scenarios, but only if the issues exist in a hierarchy. If there are issues that are lateral, or in different projects being worked on by different teams, etc, this may not work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right, @Ryan M For some reason, my mind played a trick on me and I read "subtasks," which isn't the case. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Haha, well, they didn't give any specifics on the blockers so they could potentially all be subtasks, and if so, this way is much simpler!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone, in fact it would not only be for sub-tasks but also for other types of issues. In my context a task or user story that blocked a other task, for example. In this context I cannot, or I have not found a way to do it via workflow.
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.