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

Scriptrunner to automate the status change when a comment is entered.

ELI0067 September 8, 2022

I am looking for suggestions for performing the status change of a ticket when entering a comment from "In Progress" to "Waiting for Customer". Any help, please?

1 comment

Comment

Log in or Sign up to comment
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2022

Hello @ELI0067 

Is there a reason that you need to use ScriptRunner for this?

Is this for a Service project or another type of project?

Are there any conditions that need to be applied to the comment in deciding the status should be changed?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2022
ELI0067 September 9, 2022

Hi @Trudy Claspill ,

Thank you for your reply.

I could not find information on how to proceed based on my Jira version. I believed that maybe a ScriptRunner was needed. I had seen that there was the possibility to create an automatic workflow with customizing the rule, but I don't know how to create the transition issue action (see pic). Could you point me on the right path, please?

Transition on Comment.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2022

First, we need clarification from you.

Is this for Jira Cloud of for Jira Server/Data Center? If you are using Jira Cloud the URL for your instance with be similar to

https://<yourCompany>.atlassian.net

Based on responses in your other posts, I believe you are using Jira Server/Data Center. In other posts you mentioned that you are using v8.20.10, and versions are applicable only to Jira Server/Data Center.

Next we need you to clarify what type of project this concerns. From the image you shared I believe you are working with a Service Desk project, not a Software project. Please confirm for us which type of project this question is about.

If this is about a Service Desk project, we need to know the version of Service Desk that you are using. The version of Jira Service Desk is different than the version of Jira Software, and the documentation for those is separate. Here is a link to the documentation for the latest version of Jira Service Desk Server/Data Center:

https://confluence.atlassian.com/servicemanagementserver/jira-service-management-data-center-and-server-5-2-documentation-939926001.html

And this is the link within that documentation set for legacy Automation features:

https://confluence.atlassian.com/servicemanagementserver/automating-your-service-project-939926334.html

 

Looking at the image you attached, I see that you already have the Transition actions in it.

Screen Shot 2022-09-09 at 3.11.12 PM.png

 

And it seems like the ELSE IF at the bottom of the screen covers your scenario.

If the automation you have created is not working in the way you expect, please provide the details of the scenario you are executing and what the results of this rule are in that case.

ELI0067 September 11, 2022

Dear @Trudy Claspill 

Thanks for being so patient. Sorry but I'm still a newbie at this.

I found my company's data center version Jira Service Management 4.20.10.
I am working on the Service Desk project.


In addition to customizing the rule in TRANSITION ON COMMENT (from the option, I changed as: Run as the user who triggered the rule) I added the third condition ELSE IF / THEN, I also created a new transition in my workflow as shown in the added pic, but I am not sure if I need to add some conditions, validators or post-functions in that.Go to Waiting for Customer.png

My problem is to find a way to activate this condition (change status of the ticket from "In Progress" to "Waiting for Customer") when a comment is posted by a non-customer. After the links you suggested, I found transition problems in "Jira Automation Action", but I'm not sure if it is related to my topic and I don't know how to set it up anyway. I hope this information can help you understand my problem better and I would be grateful if you could help me find a solution.

Thank you

ELI0067 September 13, 2022

Dear @Trudy Claspill 

I would appreciate if you could give me some advice, please.

I'm stuck with the process!!

Thank you for your time and help.

ELI0067 September 14, 2022

Dear @Trudy Claspill 

Sorry to bother you, and I understand that you are busy.

Would you mind to give me somemore advice to try to complete my task, please?

I would really appreciate your contribution.

Kind regards,

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2022

Hello @ELI0067 

The automation shown in your image looks correct to me. Based on that image then it appears to me that when a comment is added by a a person who is an Agent (and not a Customer also) and the status of the ticket is In Progress and the commend is public, then the issue should transition to Waiting for Customer.

If that is not what is actually happening then please tell us exactly what is happening and show us screen images to support that the conditions of the rule are met by the status of the issue is not changing.

If you are finding any error messages, please provide those also.

You should not need to add any conditions, validators, or post functions to the transition to make this work. 

ELI0067 September 15, 2022

Hi @Trudy Claspill 

Thank you for your reply.

When I have the ticket in the "In Progress" status and I write a comment, the status does not change to "Waiting for Customer" and it does not show any errors. I am attaching screenshots of the customization rule, ticket workflow and ticket workflow in the status "In Progress" that does not change. Is it anything else I can check to show you?

Condition of rules set up.pngIn Progress .pngTicket Status IN PROGRESS.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 16, 2022

Is the comment marked as Public?

Do the other automatic transitions in the rule work?

Is the rule Option set to run as the user that triggered the rule? If so, are you able to access an issue that is currently In Progress and directly update its status to Waiting For Customer?

ELI0067 September 19, 2022

Hi @Trudy Claspill 

I noticed from Automation - View Logs that with the castomization rules that I settled it shous the status "NOT EXECUTED" (Fig.1).

Fig 1 -STATUS - NOT EXECUTED.pngI tried to make some cominations and I saw that when I put "User is an agent" it gave me the status "ERROR" (Fig.2).

Fig 2 -STATUS - ERROR - USER IS AN AGENT.png

But I also noticed that in another ticket the transition works but it is not an automatic condition and in that case I saw some properties added in it and it works showing the status "SUCCESS" (Fig.3).

Fig 3 -STATUS - SUCCESS .png

I tried to add the same properties in my ticket but it didn't work again. Do you have any others ideas where I can have a look?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2022

In each of the three scenarios you showed above is the comment getting added by the same user?

Is that person able to go directly to the issue and change the status from In Progress to Waiting for Customer?

ELI0067 October 10, 2022

Hi @Trudy Claspill 

I cannot change status from "In Progress" to "Waiting for Customer".
When I have created the transition (Go to Waiting for Customer) it switches from "In Progress" to "Waiting for Customer". But then I hid it, as it showed in the ticket and it took the user (assigned to the ticket) who had to manually press it to switch to "In Progress".

Maybe this can help you to understand better the situation?

TAGS
AUG Leaders

Atlassian Community Events