Hi Team,
Am trying to write an automation to move a Story to "Done" when all of its related Work Tickets are in either "Done" or "Rejected" status.
this is what i have right now. please help in solving.
Hey, @Sabareesh Kumar M
I have created an automation that works, but you will need to tailor it to your needs.
So based on what you are saying, you wanted linked issues to dictate the status of the "parent" ticket in this case. And I'm imagining you'll predominantly be changing the statuses of linked tickets as opposed to the "parent"
So this automation
TRIGGER: issue transitioned to resolved.
It then checks if the issue is linked to anything
If yes it branches to the linked issue (in this case the "parent")
It then checks if all the "parent'" linked issues are resolved
If yes it will resolve the "parent"
If not, it will not do anything.
You can tailor this by changing the first IF from all link types to a specific link type, if you use a certain one. And change the JQL in the second IF to match your statuses.
Where it technically fails, is it you resolve the "parent" it will resolve the linked issues. But that being said if you resolve the "parent" ticket you could consider the matter resolved anyway.
I hope this helps
Aaron.
Hi @Aaron Williams ,
thanks for the efforts put in, i tried but its not working as expected, sharing the screengrabs here.
The For branch checks the Story(16293), ideally it should check the other linked tickets then only the story needs to be closed.
i have moved the all the linked tickets(16294,16295) to Done to test, then also its shows no action performed.
Am missing something here, can you please check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sabareesh Kumar M
When you say "related work items" do you mean work items that are linked to the trigger work item using the "relates to" link relationship?
What are the results when this rule executes? Please describe the results and provide screen images showing the output in the rule execution Audit Log. Make sure to expand all the details in the rule audit log entry.
I can see a few potential problems with the rule.
First, the trigger is "When the item transitions to Done or Rejected". The rule will be triggered only after the transition completes. The Status of the trigger work item will already be set to Done (or Rejected) by the time this rule runs. Your action to Transition the item to Done is only effective at changing the items status from Rejected to Done.
If you are trying to prevent the work item from being transitioned if the related items are not in an acceptable status, you can't do that with an Automation Rule. The rule will be triggered after the transition is completed. All you can do at that point is transition it out of the Done or Rejected status to another status, if the related items are not Done or Rejected.
If you are trying to automate the transition of an item to Done or Rejected when all its related items are Done or Rejected, that is going to be a bit more complicated.
So, let us start by clarifying your requirement. Are you trying to automate the transition of an item when its related items are all in the specified states, or are you trying to prevent the transition of an item if all its related items are not in the specified states?
The second problem I see is with your Work Item matches JQL condition. Did you test that JQL in the work item search screens with an actual work item to see if you get the expected results? I tested it and it is not a valid JQL.
After we have clarity on the requirement you are trying to satisfy, then we can provide advice about possible solutions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill ,
Thanks for checking.
I have a story and two tasks. These two tasks are linked to the story via "relates to".
For example if DTC-16295 & DTC-16294 are moved to Done/Rejected status one after the other, then my Story ticket DTC-16293 should be moved to Done status automatically.
If either one of the tasks (DTC-16295 & DTC-16294) are not in Done/Rejected status - my Story ticket shouldn't be moved to Done.
I want to trigger the rule when anyone of the tasks is moved to Done/Rejected status and it should check the other "relates to" tasks status and take the next step accordingly.
JQL am not sure on that. let me test,
thanks.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sabareesh Kumar M it looks like the second IF statement is different to my solution. You need to target linked items again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Aaron Williams , corrected. I have tried and it worked for the current test case which i have right now. Thanks a lot, let me do some more tests with the same rule.
Thanks for your support!!!
Sabareesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sabareesh Kumar M you are very welcome.
Aaron.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.