Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy all comments with timestamp while cloning an issue?

Gaurav Gupta
Contributor
May 30, 2022

Hello All,

 

For our use case, we need to copy the comments while cloning an issue. We are trying to leverage the Automation but have not been successful till now.

Any suggestions to achieve this, especially with native functionality, are highly appreiated.

4 answers

3 accepted

3 votes
Answer accepted
Mathieu Lepoutre _Exalate_
Contributor
May 30, 2022

Hi @Gaurav Gupta 

 

I'm working as a pre-sales engineer with Exalate.

I will suggest something out-of-the box.
Cloning the issue to another Jira Cloud instance with Exalate, and then you can configure that the comments will get copied over.

The ticket will out-of-the-box be fully bi-directionally syncronized, which means, if a field gets updated on either side, it will automatically update on the other side, you can change this to make it uni-directional if you so please.

Exalate is easy and straightforward to set-up and you can control exactly which data you want to send and/or receive. 

If you would like to see a customized demo of the product, please book a slot with us. 

Cheers

Mathieu Lepoutre

1 vote
Answer accepted
Gaurav
Community Champion
May 31, 2022

Hello @Gaurav Gupta 

Apart from the above suggestions, Automation can be leveraged to create something similar.

Please find below the snapshot of the rule we created for a similar use case. This brings all comments from the original issue and publishes them separated by dashes and blank lines with the author and timestamp.

The code snippet for comment uses smart values and is as:

{{#destinationIssue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
------------------------

{{/}}

 

Let me know if this helps.

--GG

Copy comments to Cloned Epic.PNG

Gaurav
Community Champion
May 31, 2022

@Gaurav Gupta Just to add, the automation fails if the overall length of the comment is more than 32767 characters. This is the default maximum length allowed for comments. There are open tickets with Atlassian to handle this scenario.

Pikk Phengsykeo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 13, 2022

This works great. Thank you!!!

1 vote
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 30, 2022

To answer the main question, no, you can't do this with plain off-the-shelf Jira.  It's not something cloning is actually for, so there's no functionality in the cloning bit, and Jira expects different issues to be there for different reasons, and not have comments be copied because they are separate issues with their own life cycles.

You'll need an app to implement this, and Mathieu has already talked about one of the ones I would suggest.

1 vote
Uli Low
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 6, 2022

I've been working on something for my team when cloning issues and needing the comments from the trigger issue added in that automation. The code I have used is an edit on @Gauravcode. 

I used: 

h3. Comments from issue with IT Support

{{#triggerIssue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
------------------------

{{/}}

This rendered something like this:
2022-09-06 16_57_49-[ITS-4700] CLONE - TEST - Jira.png

I included this are part of my clone automation, I've added a screenshot below:
2022-09-06 16_57_23-Slack _ Uli Low _ Liberis.png

Just remember to make sure the scope in the rule details covers both projects (if you're cloning between two projects) otherwise the comments won't be available. Hope this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events