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

Add Comment to custom Solution Field on Status Change to Resolved

Valerie Vliegen December 24, 2024

When changing the status 'In Progress' to 'Resolved' I have created a specific screen. In this screen we can leave a comment to the customer. This in most cases will be a overview of what we have done and what the specific solution is to their problem. 

We would like this comment to be entered automatically in a specific custom field named 'Solution'. 

Right now, I tried this set up, but it is obviously not working as I feel there are some things missing. I couldn't find how to specify the exact transition screen. 

Current set-up:

2024-12-24_13h52_37.png

2024-12-24_13h53_00.png

2024-12-24_13h53_28.png

Thanks in advance! 

2 answers

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 24, 2024

@Valerie Vliegen 

Welcome to the community.  Based on your ask and information, your automation rule should not be triggered off from issue commented event.  It should be triggered off from issue transitioned from "In Progress" to "Resolved".  Before you edit your issue action, conduct a "Refetch issue data" action, then you can obtain the latest comment via smart value {{issue.comments.last.body}} captured into your custom field. 

Here are some key references in regards to issue comments (since an issue can have many comments) and how to use smart value syntax -

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

***** To obtain the latest issue comments using rule: {{issue.comments.last.body}} which accesses the body of the last comment added to an issue,  In addition, you can also access the author of the last comment using {{issue.comments.last.author.displayName}}

Hope this also helps.

Best, Joseph Chung Yin

Valerie Vliegen January 2, 2025

Hi, I first tried it without the 're-fetch issue data' and it worked.

But where should I put the 're-fetch issue data' action? Because I cannot add it as the first action of the automation. 

2025-01-02_11h10_39.png

Also, what is the specific reason for this action in this automation?

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 2, 2025

@Valerie Vliegen -

I believe you may got confused with Triggering event and action.  "Re-fetch issue data" is an action which is always available after a triggering event.

The reason for using issue transitioned as a triggering event is because your original ask where you stated - "When changing the status 'In Progress' to 'Resolved' I have created a specific screen. In this screen we can leave a comment to the customer. This in most cases will be a overview of what we have done and what the specific solution is to their problem. ".

It simply means that the rule will be triggered when an issue is transitioned.

In addition, you can also add an advance field comparison condition (example - "

{{smart values}} condition")

to check if a comment is an internal or shared by using the smart value {{comment.internal}} where value is either True/False.

This will help you to ensure only shared comment is used in your process.

Hope this helps.

Best, Joseph

 

Valerie Vliegen January 2, 2025 edited

Ah, I meant, what is the reason why I have to add the 'refetch the issue' action?

I understood why the transition event would be a better trigger than the 'made a comment' one. 

I'll have a go with the conditional logic in the automation. 

 ETA: I now know why the 'refetch issue' action was added. That way it gets automatically refresh so you don't have to press the refresh in the browser. 

0 votes
Sarp Egemen
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.
December 24, 2024

Hi @Valerie Vliegen ,

Can you replace {{comment.body}} with {{issue.comments.last.body}} as the edit issue action and then check if it works?

Best,

Valerie Vliegen January 2, 2025 edited

Hi, I tried this and it worked! But, it also adds the last comment if it is an internal comment and that's not something that we would like. 

Suggest an answer

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

Upcoming Jira Service Management Events