Auto-close issue when commented
Asked by Drishti Maharaj:

Hi,

So I have an automation that when an issue is transitioned to a certain status, the requestor gets an email similar to below:

"Please acknowledge that you have received your item from the Procurement Team by responding to this email with "Received" in the body email."

The requestor responds with Received and that adds the comment back onto the issue.

That seems to be working.

However, the issue is, when that comment comes in, I want to transition the issue to a closed status.

I can't seem to get the attached automation working for that and I am not too sure where the issue is?

Thanks.

![Screenshot 2024-09-05 142932.png](/t5/image/serverpage/image-id/345765iC5251C9B2C2046E6/image-size/large?v=v2&px=999 "Screenshot 2024-09-05 142932.png")


Answers:
author: Susan Waldrip
body: Hi everyone, I'm trying to do the same thing as [@Drishti Maharaj](/t5/user/viewprofilepage/user-id/4311470) and have tried several things, but am looking for a solution that won't run an automation every time a comment is made (or am I misunderstanding the rule trigger?). Has anyone created such an automation or other means to achieve this?

comments: author: Drishti Maharaj
body: Hi [@Susan Waldrip](/t5/user/viewprofilepage/user-id/5343063)

I think the condition of looking at the specific words in the comment is what allows the automation to run only if that condition is met. If other comments are added but the words are not there, then the automation won't run.


author: Susan Waldrip
body: Ah, thank you [@Drishti Maharaj](/t5/user/viewprofilepage/user-id/4311470). I'm trying to keep our automation count as low as possible so if it fails (versus if it runs but doesn't find anything, which is what I was thinking counted as a "run"), then I'll "borrow" your automation with many thanks!


author: Drishti Maharaj
body: Figured it out lol we had a minor spelling issue looking at the comment received via email ?


author: Jack Brickey
body: Hi [@Drishti Maharaj](/t5/user/viewprofilepage/user-id/4311470) , what does your audit log show when the rule is triggered? Is it possible that there is not a transition to Done in the current status when commented?

comments: author: Drishti Maharaj
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) - the audit log shows "No actions performed"

I think the issue might be on the field I picked.

I picked "comments" but I am not too sure if that is the standard field within JIRA itself?  

So I do have a transition between that current status to Closed.

![Screenshot 2024-09-05 144559.png](https://community.atlassian.com/t5/image/serverpage/image-id/345768i187B989DA1A6C757/image-size/large?v=v2&px=999 "Screenshot 2024-09-05 144559.png")


author: Drishti Maharaj
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) , I even tried to edit the automation to use the smart values as attached, but the audit log still shows "no actions performed".

![Screenshot 2024-09-06 062822.png](https://community.atlassian.com/t5/image/serverpage/image-id/345911iAD53009D73F89E11/image-size/large?v=v2&px=999 "Screenshot 2024-09-06 062822.png")


Tags: cloud

jira-service-management

jira-service-management-cloud