Forums

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

Jira Automation copy Comments

Federico Frade
Contributor
August 14, 2026

I'm setting up an automation using Jira Automation to copy data from one work item to another. The trigger I'm using is "Issue assigned," and I've implemented it with a lookup to the new ticket and an "Edit Work Item Fields" action set to "Copy comments from trigger work item." The problem is that I'm getting this error: "We excluded the configured field from this action as it couldn't be found: Comments." Is there a way to force the trigger's comments to appear or become accessible?

 

workflow_1.pngworkflow_logs.png

4 answers

3 accepted

1 vote
Answer accepted
Sami Shaik
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 Champions.
August 14, 2026

Hello @Federico Frade , you are one step from done, and the step has two versions depending on how exact you need the result. Credit where due: @Gor Greyan branch is the right iteration and @Lalithesh smart value is the right source, the remaining problem is only where the comments land, so let me close that gap.

Why your Lookup attempt failed first, because it explains both fixes: smart values like the lookup result do not reliably survive into an advanced branch's iterations. The reliable carrier is a variable created before the branch, variables persist everywhere in the rule, including inside branches.

Option 1, no web requests, and it matches what you actually asked for (author names included): post ONE comment on the destination containing every source comment, attributed and chronological, using smart-value list iteration instead of a branch:

  1. In the rule, after your destination work item exists (your clone or lookup step), add a branch: For most recently created work item (or your destination branch)
  2. Inside it, a single Comment on work item action with:
Comments copied from {{triggerIssue.key}}:

{{#triggerIssue.comments}}
{{author.displayName}} ({{created.format("dd MMM yyyy HH:mm")}}):
{{body}}
----
{{/}}

The {{#list}}...{{/}} iteration renders every comment with its author and timestamp. One comment on the destination, full attribution, zero API calls. This is the version I would ship for a migration flow.

Option 2, if it must be one destination comment per source comment: the wall you hit with ADF disappears when you use the v2 REST endpoint, which accepts plain text bodies:

  1. Create variable before the branch: name destKey, value your destination key (from your lookup or created item)
  2. Advanced branch over {{triggerIssue.comments}}, variable name comment
  3. Inside the branch, Send web request: POST to /rest/api/2/issue/{{destKey}}/comment, JSON body:
{ "body": "Comment by {{comment.author.displayName}} on {{comment.created}}:\n{{comment.body.jsonEncode}}" }

(Authenticated with an API token via Basic auth headers.) Two caveats from real use: jsonEncode is not optional, the first comment containing a quote character will break the request without it, and advanced branch iterations are not guaranteed to run in order, which is why the timestamp prefix matters, the destination reads chronologically even if creation order shuffles.

Between the two: Option 1 is simpler, needs no credentials, and satisfies the attribution requirement you stated. Option 2 buys per-comment granularity at the cost of a web request and token management. Most teams that start with 2 end up at 1 🙂

Federico Frade
Contributor
August 14, 2026

Thanks, Sami; this was the missing piece. @Lalithesh answer had already gotten me very close, but since the values ​​were being copied as concatenated body content, I hadn't thought to iterate through them (plus, I thought there was a limitation on doing this within Advanced Branches).
I applied these changes, and everything worked perfectly.
I'm attaching a screenshot of the final configuration in case anyone else comes across this thread later.

final_workflow.png

 

Thanks also to @Arkadiusz Wroblewski , @Gor Greyan and @Lalithesh ! for your answers there were really useful.

Like • # people like this
1 vote
Answer accepted
Gor Greyan
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 Champions.
August 14, 2026

Hi @Federico Frade

@Arkadiusz Wroblewski KB is the right direction here.

The important point is that Jira Automation can copy comments from one work item to another without using the REST API. Atlassian’s documented approach is to iterate through the source work item’s comments and add them individually to the destination work item.

In your rule, because the original work item is the one that triggered the automation, you can reference it with {{triggerIssue}} even while you are inside the branch for the destination Service Desk work item. Atlassian confirms that triggerIssue continues to point to the original triggering work item inside branches, and all normal issue properties are available on it.

So I would use an Advanced branch over:

{{triggerIssue.comments}}

Give the branch variable a name such as comment, then inside that branch add a Comment on work item action with something like:

Comment by {{comment.author.displayName}} on {{comment.created}}

{{comment.body}}

The Comment on work item action supports smart values, so there is no need to fetch the comments via REST or convert ADF manually.

Federico Frade
Contributor
August 14, 2026

Ok so the solution you proposed works almost perfectly, but there’s a problem: it creates the comments on the trigger work item. I want to create them on a new one instead, so I tried using a "Look up work item" action, but it didn't work. I’m not sure if this is an Automation bug or if I’m misunderstanding how to use it. In the original workflow I shared, it selected the work item correctly—but I was using it to initialize branching there, which I can't do here because I'm using a `foreach` loop (and there's a limitation preventing nested branches).

comments.pngnew_flow.png

Like • Sami Shaik likes this
1 vote
Answer accepted
Lalithesh
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 Champions.
August 14, 2026

Hi @Federico Frade 

Welcome to the Atlassian Community!

The Comments actions are separate from the Edit Work Item action. To update fields such as Description and Priority, use the Edit Work Item action. To copy comments, add a separate Add Comment to Work Item action

Cheers!

Federico Frade
Contributor
August 14, 2026

Hi Lalitesh! Thanks for the reply and the welcome. I understand the proposed solution, but it has a limitation within the "Add comment on a work item" interface (which is the only one I see for this): there is no option to copy an existing message—and therefore neither copy all of them—a feature that is available (or so I understand) from the other screen.

create_comment.pngcreate_comment_2.png

Like • Sami Shaik likes this
Lalithesh
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 Champions.
August 14, 2026

@Federico Frade You need to add a smart value to perform this action. For example, if you'd like to copy over all comments, add {{triggerIssue.comments}} smart value in the box

You can find more details about the smart values here - https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

Screenshot 2026-08-14 144221.png

Like • Sami Shaik likes this
Federico Frade
Contributor
August 14, 2026

This works, even though it’s not exactly what I need; it combines all the comments into a single one, whereas I’d like to at least include the name of the person making each comment in the text.

Like • Sami Shaik likes this
1 vote
Arkadiusz Wroblewski
Community Champion
August 14, 2026

Hello @Federico Frade 

What is the purpose of your solution and its use case? Depending on that, there can be a couple of solutions.

Best,

Arek 🤠 

Arkadiusz Wroblewski
Community Champion
August 14, 2026
Like • Sami Shaik likes this
Federico Frade
Contributor
August 14, 2026

Here is some additional context regarding the use case:

I have a work item originating in a "common" space, and I want to automatically move it to a "Service Desk" space. That is the goal of this automation (what you are seeing is an isolated test of one part of the process).

To be more specific, the issue I haven't been able to resolve is copying comments from one work item to another—or, more precisely, copying the comment content itself (the original author isn't a priority for me).

  • I should also mention that I explored various combinations of GET requests to the messages and branches endpoints, as well as POST requests to the endpoint for creating work item messages, but I didn't achieve good results due to:
    the automation limitation preventing iteration over fields in a `foreach` loop
  • the inability to access the comment as plain text (it always returns in ADF format)
  • the fact that the GET endpoint returns the data in a different format than what the POST endpoint expects
Like • Sami Shaik likes this
Arkadiusz Wroblewski
Community Champion
August 14, 2026

It was asked surprisingly often on the Community Forum.

For example, here you have one example of design. https://community.atlassian.com/forums/Jira-questions/JIRA-Automation-Clone-Issue-clone-comments-link-issues/qaq-p/2603347 

Like • Sami Shaik likes this
Arkadiusz Wroblewski
Community Champion
August 14, 2026

@Federico Frade glad to hear that 

Suggest an answer

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

Atlassian Community Events