A little more background:
For my current project I want to be able to change my link type through an automation.
I've set up an automation to give the blocked by tickets in the blocked relation an impediment flag. The problem I ran into is that when several tickets are blocking I don't want the flag removed when one of the blocking tickets is set to done. I only want that to happen when all blocking tickets are closed. I know I can trigger an automation when no link types of a certain kind (blocks in this case) are remaining.
However to make it harder, we want to keep the status so we can look it up at a later date and preferably not through a label. So what I did was create a new Link Type: was blocked and was blocking. When a ticket a blocking ticket is closed, I want the link type for that ticket to change to: was blocking. But I can't seem to get it to work.
Does anybody know how I can set a link type (was blocking) for a ticket?
I understand that you want to "unflag" a ticket when all tickets blocking it are resolved, but it sounds like you want to keep all the tickets linked together?
You are actually able to do that without switching the link to another type. I wrote an automation rule that will do that for you. The only caveat with this rule is that it will only work within a single project. Check out the configurations below:
This will run each time a ticket in my project is resolved, this rule will run. It will check if the ticket resolved "Blocks" any other ticket. If it does, it will check the ticket it blocks to see if all tickets blocking that ticket are resolved.
If they are, it will clear the impediment flag. This way you don't need to change the link types at all!
I shouldn't have said that it "won't work". That's not actually true. The issue that I was thinking about is that any automation rule which runs across multiple projects is considered a global rule. With the standard plans, you only have 500 global executions/product/month.
It's unlikely that you'll have 500 flagged tickets over the course of the month, but you have to run the rule each time a ticket is resolved. If you resolve too many tickets, you'll exceed your execution limits and the rule will stop working until the start of the new month.
Oh thanks for the heads up. We're not using a lot of automations at the moment and will probably have somewhere close to 60-70 resolved items every 4 weeks. But it's good to keep an eye out for.
I slightly tweaked your automation and made it trigger on the transition to either closed or resolved because one of our projects does not use the resolution field. It works perfectly at the moment, so thank you for your help!
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
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