Hi all,
I tried to find a solution over the community but I am still struggling. I hope someone can guide me or can give me any tipps. Maybe I am too blind to see the solution myself.
We are working with two JIRA boards, Idea board and dev board. When a ticket is moved on the idea board from "in review" to "done" with status accepted, I wanted the automation to clone the issue onto the dev board, link the two issues and clone also all the comments.
All is working except for the Link issue to and the add comment to issue. The automation creates me a Clone ticket on the new board but I do not get a link to the root issue nor are taking any comments over...
What am I missing? Is my approach somehow wrong? Thanks in advance for the help. Very much appreciated.
With best regards,
Yannick
Hello @Yannick-Noah Raubuch
The reason your rule is not linking the trigger issue to the newly created issue is because of the context.
At the point you are executing the Link Issues action, the issue context is still the trigger issue. So the action is trying to create a link to the trigger issue from the trigger issue.
To create the link between the Clone and the trigger issue you need to do this to change the context/focus to the newly created issue:
You will need to add the Assign action and the Comments action within that branch also.
In the Comments action you will need to change the smart value from issue to triggerIssue. "issue" references the issue that is currently in context, which would be the newly created issue when the actions are within the branch. You can use "triggerIssue" to refer back to the issue that originally triggered the rule.
I note also that you are creating the clone in a different project than the trigger issue. In order to make changes to that newly created issue within this rule your rule scope will have to include both the source project of the trigger issue and the destination project of the newly created issue.
Lastly note that when you use {{triggerIssue.comments.reverse.body}} what you will get as output is a comma separated list of the bodies of the comments. You won't get the authors or dates each comment was made.
So if you had three separate comments:
Author1 on 1/1/2024
comment 1
Author2 on 1/2/2024
comment 2
Author3 on 1/3/2024
comment 3
...then what you would get in your cloned issue is one comment dated with the current date and containing:
"comment 3, comment 2, comment 1"
Yes, and...to Trudy's answer:
Although you could iterate over the comments in the trigger issue and add them one-by-one to the newly created issue, there is no guarantee of what order they will be in for the new issue. As your intent is to copy "idea" issues to "delivery" ones, the order of the comments may be relevant to your teams.
The reason for this sequence behavior is rule branching on more-than-one-thing is executed in parallel, each item processing on its own, helping to improve performance, etc. And there is no guarantee of when the branch will complete, up until the last step of the rule.
There are marketplace apps to help cloning, and they may perform the processing sequentially rather than in parallel, helping to make the clone as close to the original as possible. If you need the comments in the original order, perhaps investigate marketplace addons, specifically asking the vendor how their tool handles such things.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi both,
thank you so much for the answers. I changed my automation now to this. I included a separate branch and changed the information in the comment to triggerIssue...but somehow, the automation seems to work (no errors) but I am still not getting the link between the tickets and the comments.
Is there anything else I need to give permission or so?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Yannick-Noah Raubuch would you please post an image showing the audit log details for the rule execution? That may provide some explanation of what is happening. 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.
Ah...the issues are in different projects.
I hypothesize you created this rule in a single project, and so it has a single-project scope. Rules in one project can create (or clone) issues into other projects, but they cannot see or edit them otherwise, and linking is an edit (i.e., both issues in the linking change). As the log shows, the branch did not find the issue as it is outside of the project.
The fix is to change the project's scope to global or multiple-projects, and potentially to add more rule conditions, as needed. To change the scope, as you have site admin permissions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share a screenshot of the Audit log?
Does it say anything if it fails or if it works?
Regards
Aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aaron,
thank you :-) there is no error. It seems to work fine.
Regards,
Yannick
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.