You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Can we copy comments while cloning the Jira issue in cloud
You can create an automation that is triggered on issue link > then look for {{destinationIssue.comments}} (this looks for the issue that yours is cloned from) > use an advanced branch to iterate over each comment and > then add the comments one-by-one to the cloned issue.
I used these articles to help me get here:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
The branching shown in this example collects the comments from the destination issue and then adds those comments to the destination issue.
How would you copy the comments from the source issue to the destination issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe the naming of that is counter-intuitive. It actually takes from the source issue and copies to the new, cloned, issue. It confused me as well, but it does what I want it to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I must have something setup incorrectly then because it's currently not working to copy the comments from the source issue to the new cloned issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've gone through the rule several times and I'm not getting it to work properly.
The rule triggers based on a "clone" link type being established.
Within the rule, the source issue is the issue that was used to do the cloning.
The destination issues is the issue that was cloned.
The Advanced branching is collecting the comments from the destination issue. In this case, that issue would not have any comments (since the clone just occurred and comments aren't copied over, which is the entire point of creating this automation rule).
The rule then adds comments to the issue, "the issue" being the source issue (aka the issue that was used to do the cloning). Since the destination issue (aka the issue that was cloned) has no comments, nothing happens.
Unless I'm completely missing something, I'm not really sure what this rule is doing for you that is solving anything.
I need the rule to copy the comments from the issue that was used to do the cloning to the issue that was cloned. If I could specify which issue to "Add comment" to, that would solve the issue I'm having.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe the destination issue in this case is the original issue that was being cloned from because the issue triggering the automation is the cloned issue.
I just ran through the use case again to check my own sanity and it's working as I understand you're expecting it to.
Add comment to original issue:
Clone issue:
Look at Cloned issue and see the magic:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response Patrick!
The cloning I'm doing is occurring within another automation rule, based on the transition of the issue.
Within the automation rule to copy the comments, the source issue is the original issue (SUP) and the destination issue is the cloned issue (AE).
So, that seems to be my problem, because when adding the comment, the logic wants to do it against the source issue. I have no way to tell it to add the comment to the destination issue.
If I could either flip the issue scope of the rule or add the comment to a specific issue, then it would probably work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, that is the problem. I just confirmed it by cloning an issue manually. When cloned manually, the source issue is the newly cloned issue and the destination issue is the issue that was cloned from. When cloning occurs from within my automation rule, the subsequent automation rule gets the issues reversed.
I looked into my automation rule that is cloning the issues and I set up the link type backwards... Corrected this and now it's working as expected.
Sorry for so much back and forth, but thank you for going on this journey with me!
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.
As a workaround, you can create a comment that has all of the comments from the triggering issue concatenated. In the automation, after cloning the issue, create a branch to update all created issues, then add a step to create a comment.
Use the smart-value: {{triggerIssue.comment.body}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanx for your answer, works perfect when cloning an issue.
One question, is it possible to genereate this comment with all the previous comments combined but then sorted by date descending? it defaults with an ascending order.
hope you (or someone else) can help me out! thanx in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Tushar.Kamble
Our app Elements Copy & Sync would let you copy comments (as well as any fields or attachments you want) when you cloning the issue. You can also chose if you want the copied issue to be synchronized with the original.
The Cloud version is not yet available on the Marketplace, but you can sign up to get updates about the release: https://copy-sync-cloud.elements-apps.com/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think so because the comment should be related to the issue. Even if you clone it, you may want to begin another story, sorry.
Otherwise, you can try to export to CSV file your issue and then import it. I am not fan of this method but it works sometimes.
Hope it helps !
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.