I have looked this up in a few places and the answers seem to have been from a couple of years ago and I couldn't get the solution to work.
I have a service helpdesk board which does what it says on the tin. The customer add's a ticket like it would any support board, the ticket gets triaged or estimated and if necessary a second ticket is created in a secondary project board.
Before creating a ticket on the project board there is normally quite a lot of correspondence between myself and the customer all of course ends up in the comments of the original ticket.
1) When creating the secondary ticket I need to copy accross all comments and attachments / links in those comments from the original ticket. I assume that there must be a "For Each" function somewhere but I still cannot find an action to copy between the two issues.
2) I need to set up a second automation so that if a comment is made on one ticket that the same comment is copied to the other ticket.
I am very new to jira automation so any assistance / sample code etc would be extremely appreaciarted.
Regards
Steve
Hi Trudy
Sorry for the late reply.
I have managed to the the Bill Sheboy post to get all the comments and it is perfect. I now just need to find out how to add any attachments somebody add's. Not critical so I will worry about this after this.
The first screenshot is what I originally had when trying to copy only the most recent comment but the then realised I was interating with the #.
I then changed it to this :
All this did was make a copy of the destinations comments and create a duplicate and not take the newly added comment.
Then I tried this ...
This time I at least got the latest comment but it was part of the copy of all the triggerissues comments. I wasn't using the # character so it should have taken only one of the comments. Or am I wrong?
Thank you Trudy. Let me try and answer point by point:
1) I am the admin
2) I have a custom field which I use as a trigger to start an automation
3) I then use the "clone issue" option and this automatically creates a link between the original and new ticket "is cloned by". Before I figured out the "linked-issue" was automatically created when cloning I had a custom field that I passed the original key back to in case I needed it.
Based on some of your other comments I have actually made some progress :) so thank you very much.
There are just two things bringing pain into my life with this at the moment
1) I have managed to copy all comments from the original ticket to the clone by using the triggerissue.comment BUT this takes all comments made and puts them into a single string so there is no way to see where the one comment starts and the other ends. Also has no user or date/time stamp per comment. It also creates a duplicate comment on the target ticket.
2) If I update the new ticket with a single comment, it now combines all comments together and passes everything back to the original ticket.
Any ideas on how to:
1) Send the individual comments (including username plus date/time) to the newly created ticket and
2) Only send the comment that has just been added.
Kind Regards
Steve
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Service Desk Manager
Welcome to the Atlassian community.
How are you creating the secondary issue? Are you doing that manually or using the built in Clone Issue option or ...?
How are you keeping the primary and secondary issues connected? Do you use issue linking?
If you use issue linking do you use a unique link type between the two issues? Could either issue use the same link type at the same time to link to a different issue?
Can you provide references/links to the solutions you tried to implement?
Automation can definitely be used to copy new comments between issues. However, since you are working with issues in two projects this would have to use a Multiple Project rule. Those can be created only by a Jira Administrator. If you are not a Jira Admin, you'll need their help to accomplish this.
You would use the Issue Commented trigger. If you use issue linking to connect the pair of issues, you can then use the Branch to get to the other issue. This step needs more definition based on how you are connecting the issues. After using branching to the other issue you would use a Comment on Issue action to add a comment. You would use a smart value to get the information from the comment addition that caused the rule to be triggered.
How you would copy all the pre-existing comments from the service issue to the secondary issue depends on how you are creating that secondary issue, and how you are tracking the relationship between the two issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm glad you have made progress.
Please provide screen images showing the rule(s) you are using to copy comments.
When you use the Issue Commented trigger you can change the comment type selected to get just the one comment added. If you don't make this change and then use the {{comment}} smart value, it will take all comments from the issue.
Regarding copying the existing comments each as a new comment on the new issue, refer to the answer from @Bill Sheboy on this post.
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.