Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,909
Community Members
 
Community Events
184
Community Groups

Can i copy comments in activity of an issue.

Hi Team,

I wish to copy 'comments' mentioned in activity section of an issue to new issue which gets created via automation on placing parent issue in a particular column. I am able to copy other field of parent issue but cannot find option to copy comments.

Please help me achieve it.

5 answers

1 vote
Jan-Hendrik Spieth
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 24, 2023 • edited

You can iterate over comments, via smart value: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.comments--

And so you would iterate the comments and copy each one to the new issue.

I hope this gets you going :-)

HI Jan,

 I tried both of the below codes in 'Additional Fields' :

{{#issue.comments}} Comment by: {{author.displayName}} at: {{created}} {{body}} {{/}}

as well as 

"comment": [ { "add": { "body": "{{#issue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
{{/}}
} } ]

as suggested by @Sachin Dhamale 

Both codes return error "Error while parsing additional fields. Not valid JSON." when published and triggered.

What could i be doing wrong here ? Please suggest.a

Jan-Hendrik Spieth
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 28, 2023

The snippet looks ok to me. It should work when you are using this in a branch, with action "comment on issue". 

Can you give us a bit more context? How does your rule look like?

Hi @Tushar Shinde

If you are having trouble cloning issues via Jira automation and don't mind using a third-party app you can try our Deep Clone for Jira app.

If you still want to use Jira Automation to trigger a clone you also can do that with a looping transition and a Deep Clone post function as described here.

Hello @Tushar Shinde 

If you don't mind using a third party app, I can recommend our Copy & Sync application that can help you with that. Our app allows you to copy and synchronize issues.

In your case, you can easily copy and synchronize comments so you keep consistency between your issues. You can also trigger your recipe directly with Automation if you want to integrate specific actions in your flow.

Anyway, I will be glad to help if you have any questions! Don't hesitate to take a look, our app is free under 10 users or there is a 30-Day trial.

Regards

0 votes
Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2023

Hi @Tushar Shinde 

Its little bit tricky

You need to use add comment action  and add the smart value in that as mentioned by  @Jan-Hendrik Spieth

Also try this

you can try this in automation rule use JSON value in additional field section

"comment": [ { "add": { "body": "<Here you can use the smart value mentioned by @Jan-Hendrik Spieth " } } ]

HI Sachin, 

I tried both of the below codes in 'Additional Fields' :

{{#issue.comments}} Comment by: {{author.displayName}} at: {{created}} {{body}} {{/}}

as well as 

"comment": [ { "add": { "body": "{{#issue.comments}}
Comment by: {{author.displayName}} at: {{created}}
{{body}}
{{/}}
} } ]

as suggested by you. Both codes return error "Error while parsing additional fields. Not valid JSON." when published and triggered.

What could i be doing wrong here ? Please suggest. Thanks.

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2023

Hi Tushar,

I am having trouble following everything that you are doing, but you should be able to use the smart value of {{issue.comments}} to get those comments. Or {{triggerIssue.comments}} dependending on how you are getting there. 

Hello John,

I am trying to copy content from an issue in Project A to new issue that gets created in Project B via automation. Automation rule triggers when an issue is moved in a particular column. I am getting description, assignee, attachment and other details from parent issue. It's only the comments that i am unable to copy currently.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 28, 2023

Did you try {{triggerIssue.comments}}

Yes, I tried it now. Getting "Error while parsing additional fields. Not valid JSON." error when automation triggers.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2023

Probably just better off using one of the add-ons like Deep Clone. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events