Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×I've set up a manual trigger automation rule to clone a ticket from one project to another.
However, when the rule is triggered, the cloned ticket isn't assigned a request type:
But strangely the issue type of the cloned ticket was correctly set to the same as the trigger issue:
In the project where the clone ticket resides, the request types are assigned to an issue type so I can't figure out why this is happening. Anyone have a clue?
Hi @Nathan Yam !
Editing the request type is a little tricky when creating/cloning issues. Also, the branching gets kind of funky as well. I've recreated your automation and tested it. You might want something more like the screenshot below. Pulling out the IF condition into the main branch is totally okay and then the branch on created issues from the automation is really the key. Make sure to set the project and issue type explicitly in the clone step.
Also a suggestion from our past experience - you may want to add an IF statement early on that checks if an issue is linked already with a certain criteria. This helped us when people clicked the button multiple times accidentally or because the automation didn't run in 0.05 seconds :-)
Hi @Harrison Ponce thanks for your response.
There is more than one issue type in the original project so I included an IF condition at the start of the main branch and then I followed your screenshot with the branch condition. I also moved the "Link issue to" condition to the main branch as the linking wasn't happening when placed in the branch. However, I'm still having the same problem.
I then tried creating a rule in the project that contains the clone ticket to set the request type when the issue type is populated but the request type is empty. That didn't work either. Super baffled. Out of interest, what is the scope of your rule, is it just the original project or both original and target project?
Lastly, do you mind showing me how you set up an IF statement early on that checks if an issue is linked already with a certain criteria?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that info! And sure thing I would be happy to look at this and show you more! If you like, we can connect and hop on a call and I'd be happy to post our final solution here in the thread! These automations can be super tricky but super gratifying when they work! It's all about the placement in the flow!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nathan Yam and @Harrison Ponce , this is a great question and i appreciate the thorough descriptions and screenshots! When you get this figured out, would you please post the automation that finally worked for you? I'm sure it would help others with the same or similar problem. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did some further investigation work today with a colleague.
1) We tried changing the rule scope from single to multiple project and running the rule again. But this didn't resolve the issue.
2) Then we tried running a different rule that does not have the branch condition to change the request type in the cloned ticket. Again the rule scope was changed to a multiple project one. Still the same issue.
Looking at the audit logs for 1) and 2), it is only the "edit request type" condition in 1) that failed, all other conditions succeeded.
When we revisited the "edit request type" condition, we found that the target project request types are not present in the dropdown. But we cannot figure out the cause since we already adjusted the rule scope to include the target project AND the target project has the request types linked to the right issue types.
Weirdly, I created an automation rule in the target project to set the request type where a created ticket has an issue type but request type is empty (below).
But when I run the rule in the original project and a ticket is cloned to the target project, the cloned ticket still doesn't have a request type. The audit log shows:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nathan Yam , for these kind of cross-project automations to work, especially with specific THEN components, it's important that these are created in the global automation under the Jira admin settings and not a single project automation settings. There you can scope rules across multiple projects and make it global or paired down to a group of specific projects. Can you confirm if that is how you're setting it up currently?
Also, to answer your piece about checking if the automation ran already, so as not to create duplicates, I would do it like the following:
This should make it so if one exists, it won't continue down the path in the automation again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Harrison Ponce no the original automation in question was only changed to a multi project automation today as we thought based on the scope description (Run rule across selected project) this would be sufficient if we then selected the 2 projects that the rule applies to. Seems strange on JSM's part that cross-project automations would only work when the scope is set to All projects. Nevertheless I will give it a try after the weekend. Hopefully it resolves the issue but I'm still baffled why the automation rule I set in the target project to set the request type didn't work either.
Thanks for the IF statement template, will also give that a go.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Harrison Ponce @Susan Waldrip I've finally resolved the issue. Harrison is right, the scope has to be global for this type of cross project automation, for whatever reason multiple project scope will not do the job even if you have selected the 2 projects in question.
Thanks again @Harrison Ponce !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's great, @Nathan Yam -- and thanks for posting a follow-up to clarify the solution!
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.