Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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.
Gary, can you pls show on screen short what you've changed ("I set up link type backwards")? I have the same problem:(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am cloning the issues through automation. Within the action to clone the issue, I was setting the link type to "is cloned by". However, when an issue is cloned within Jira, the cloned issue is linked to the other with the "clones" link type. I had to switch the link type to "clones" in my automation rule action so that the other automation (to clone comments) would work properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this entire thing is great however i cannot get it to work either. i am also triggering the automation from another automation and i cannot get the rule past the following.
doesnt matter if i use clones or cloned by
CON-18 clones ART-37
ART-37 is cloned by CON-18
suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your issues "CON-18" links to "ART-37" using the "clones" link type?
Like this:
Can you send a screen capture showing the link on "CON-18"?
Based on the automation audit log message of: "The following issues did not match the condition: CON-18", it doesn't seem like the automation rule is seeing this as the case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
doing lots of testing so ART-37 have changed to ART-60 (2nd image). got through some of my issues however the largest issue is what i think others are experienceing. i need to take all the comments from CON-18 and populate ART-## however the process always goes to CON-18 for the update. i did get the rule to fire using "clones". if i use the smart value of {{Issue.comment}} then CON-18 duplicates all comments. if I use a smart value of {{destinationIssue.comments}} nothing updates. To reitterate what i said above i cant figure out a way to update ART-## with all the comments from CON-18 (i am using the workaround suggested by Jesse and even thought it works i would prefer to have each comment separate instead of in one large comment.
Thanks for any help in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's try this...
Here's screenshots of my 2 automation rules.
This is the automation that clones the issue. You can see the clone type being used is "clones" and it points to the issue that triggered the automation rule to run.
These screenshots are each step of the automation that copies the comments to the issue that was cloned.
Note: The "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule." checkbox is checked.
Rule triggers when a link type of "cloners" is established.
A check ensures that the issue this rule is running against has a link to an issue using the "clones" link type.
A branch rule is added to cycle through the comments from the "destination" issue.
The add comment action adds each comment from the "destination" issue to the "trigger" issue (with some additional data for clarity).
Hopefully this helps you to compare the configuration of your automation rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Gary. the funny thing is my rules were exactly like yours with 2 exceptions (1 was the value compare. which i did not use) and 2 your automation is a global rule where since i was testing i kept the rule to just the project i was using. i changed the role to a global rule and it worked great and then i started to think that i only had it setup for 1 project, not the project that i was cloning the issue to. i move it from a global rule to the 2 project and it still worked like a champ. sometimes we just cant get out of our own ways. i really appreciate the help and its perfect now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome! So glad you got it working. There's so many little caveats (single project vs multi project vs global) that are "got ya's" for me all the time. That's why I figured just sharing screen captures of the rules I had for you to use as a comparison would be helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! I am having the strangest issue. I was able to follow the steps above and a comment is now populating in the cloned issue. However, the smart vales aren't pulling over the comment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexandra Astor, I'm not sure what you are saying your issue is. You said the comment is populating in the cloned issue, but the smart values aren't pulling over the comment. What do you mean by "the smart values aren't pulling over the comment"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gary - The automation is creating a comment in the cloned issue but it only has the static text from the automation rule. It is not pulling in anything from the smart values. Here are some screenshots:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your named the smart value: OriginalIssueComments, but then, when adding the comment, you referenced the smart value as: DestinationIssueComments. Change the smart value reference to OriginalIssueComments and it should work.
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.
Send a screen capture of the component that is creating the smart value. I'm guessing the smart value you're specifying is incorrect. It should be: "{{destinationissue.comments}}".
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.
Dumb question... Are there comments to copy from the issue?
You can add a log showing the # of comments:
# of comments: {{destinationissue.comments.size}}
I added a check in my rule to only proceed if there are comments to copy.
If there are comments, then maybe try adding a log to just capture the comments to see if it's something to do with the smart value you're specifying.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I haven't used this type of condition for automation before. I think I added it correctly?
Here's the audit log:
Any chance that helps?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh and to answer your question, yes there are comments. Not a dumb question, I've double checked several times.
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.
Hi Gary, thanks for your screenshots, I think it's a lot easier to understand than the another documentation I was working with. I was wondering if you could help with an issue I've encountered: the comments are not copied in the order of dates when the comments were made.
I was successfully able to copy all of the "is cloned by" ticket's comments to "clones" ticket, but the comments are all out of order. Is there a way to copy the comments from the oldest to newest?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was having the same issue, so I ended up combining all of the comments to be copied into a single comment. See the comments below from @Jesse Kona and my follow up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gary Spross Thanks for sharing those screenshots. The "Global" adjustment fixed me right up.
I'm wondering how to attach an Automation that deletes the original Issue after copying over the comments.
I currently have two Automations set up.
Any suggestions for me in this regard?
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.
I found that this is actually a better way to do it. The other way allows for each comment to be copied over individually (so separate comments), however, there is no guarantee that the comments will post is sequential order. If there's more than 1 comment, this can be confusing on the cloned issue.
Copying the comments over into a single comment allows the sequence to remain preserved (I ordered it using ".reverse" so it was in a descending order). The only note is that the comment field is limited to 32,767 characters, so beware if there are many novel sized comments being copied.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gary Spross ,
I don't know why can't the cloned issue be linked, my automation is failed.
Please help me,thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if it may help don't forget to change the perimeter of the rule in the rules details menu, by default the rule apply for one project only. Only admin can change this.
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.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.