Changing the status when replying to a client
Asked by yuriy.shilin:

Good day everyone, maybe someone has met with this situation and can share their experiences, I will be happy to see any comments.

The situation is such, I have made automation, that when the agent answers the client and sends a comment through a line "Reply to customer", then automation changes to the status pending and in the opposite direction, when the client writes the answer from a portal or from mail, then the status changes to working, but the problem is that when writing an internal comment in the field "Add internal note".

In automation I set the first condition in the rule that "The main action is a comment", probably because of this very problem, but without this field the rule will not work.


Answers:
author: Mark Segall
body: Hi [@yuriy.shilin](/t5/user/viewprofilepage/user-id/5133459) and welcome to the community!

In general, if you're using Jira Service Management you'll be able to delineate between public/internal comments by using an advanced condition:

{{comment.internal}}  
Equals  
True/False

If you're trying to do something else, please share a screen shot of your rule so we can have a bit more context on the issue you're facing.

comments: author: yuriy.shilin
body: Can you tell me where to enter this parameter?


author: Mark Segall
body: In your automation rule, you can create a new Advanced Compare Condition. This is where you would enter the detail shared above.

It may help if you share a screenshot of your rule so I can make sure I'm leading you in the right direction. Also, please confirm that this project is **Jira Service Management** as my answer will only apply to that type of project.


author: yuriy.shilin
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/237326i82BA0D6C61A2227F/image-size/large?v=v2&px=999 "image.png")


author: yuriy.shilin
body: Yes, this is Jira Service Management project


author: Mark Segall
body: Thanks for sharing the screenshot. So, in your If/Else conditions, you would just need to add an additional Advanced Condition like I proposed above

{{comment.internal}}  
Equals  
False

This will add the extra conditional logic to only perform the transition actions when the comments are public.


author: yuriy.shilin
body: I apologize for such a long absence!

I have tried different variants of setting, but the problem is that when you set this option stops the automation itself and when you answer with a normal comment, the system does not change the status, is it possible to solve this?


author: Mark Segall
body: To be clear, this should only be an additional condition added to your "Else" clause. The If condition covers when the customer comments, while the Else condition covers when the assignee comments. So, you would just add the additional advanced condition I shared above to the Else clause and this should work.


author: yuriy.shilin
body: I try this, but it doesn't work

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/243159i64ADF17C2759A07E/image-size/large?v=v2&px=999 "image.png")


author: Mark Segall
body: I'm not familiar with "Agent" in your Else condition. Typically, your agents are in a role called "Service Desk Team". You could change that user condition to:

* User who triggered the event  
  Is In Role  
  Service Desk Team


author: yuriy.shilin
body: We don't have a "Service Desk Team". "Agent" is role for our support employees

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/243183i569899E446E22181/image-size/large?v=v2&px=999 "image.png")