Scriptrunner Escalation Service not adding comment if Action is None

Andrew Culver
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.
March 12, 2018

I have created 2 Escalation Services which have Action set to perform a transition. I'm now trying to create a 3rd Escalation Service which has Action set to none. When I run it, the comment is not being added, as it is with the other 2 Escalation Services.

It seems that not having an Action means no comment is added. Maybe because there is no screen?

Here's one of the Escalation services which have an action. The one I'm trying to add has a different JQL (still matches some issues), no Action, different comment, but still uses issueInputParameters.setComment.

Description: Transition inactive issues in Waiting For Reporter status to Inactive - Pending Closure status
Interval: 60
JQL: status = "Waiting For Reporter" AND updated <= -1w
Action: 301 Reporter Inactive
Run as: jirabot
Additional Code:

def comment = """
This issue has not been updated for 7 days.

If you have an update, please update the issue. If you need more time to gather information please freeze the issue. If you have no other questions, please close this issue.

If no update is received in the next 7 days, this issue will be automatically closed.

Thank you,
Jira Automation Bot
WTS
"""

issueInputParameters.setComment(comment)

1 answer

0 votes
Joshua Yamdogo @ Adaptavist
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.
March 12, 2018

Which version of SR is this? Another customer has brought up this problem today, but I cannot reproduce it. I don't think you need to define an action to add a comment, as I have successfully added a comment without an action:

Screen Shot 2018-03-12 at 8.36.26 AM.png

Screen Shot 2018-03-12 at 8.35.22 AM.png

Thanks,

Josh

Joshua Yamdogo @ Adaptavist
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.
March 12, 2018

Our docs state:

Action

What action do you want to run on the issue? This is optional, you can use Additional Issue Actions instead or as well as

 

https://scriptrunner.adaptavist.com/latest/jira/escalation-service.html

Andrew Culver
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.
March 12, 2018

Jira 7.7.1 and Scriptrunner 5.3.5. I see 5.3.7 is available. I'll update now and try again.

Andrew Culver
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.
March 12, 2018

Joshua Yamdogo @ Adaptavist I saw that as well.

I just tried again with 5.3.7. In the add escalation service screen, I click Run now, and it shows 63 issues returned and says they were updated (as yours did), but none of the issues have any comment added. I can also click Run now again, and it still says 63 issues returned -- but there should be 0 if a comment was just added, since the JQL query is looking for issues update <= -2w.

Here's a screenshot:

Selection_248.png

Joshua Yamdogo @ Adaptavist
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.
March 12, 2018

Thanks for the info, Andrew. Have you tried the built-in script to reindex all issues?

Andrew Culver
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.
March 12, 2018

Is this different than doing a reindex under System > Indexing? I'll be doing a system reindex in about 10 minutes, after our helpdesk closes for the day.

Joshua Yamdogo @ Adaptavist
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.
March 12, 2018

That's fine. The built-in ScriptRunner reindex script just quickly reindexes all the issues, which the standard JIRA reindex already covers.

Did the reindex make any difference?

Andrew Culver
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.
March 12, 2018

We have a fairly large instance. It's been going for about 45 minutes and is about 35% done. I'll let it finish over night and update tomorrow.

Andrew Culver
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.
March 13, 2018

The reindex is complete. I've just run the escalation service again, twice, and no comments are added.

Joshua Yamdogo @ Adaptavist
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.
March 13, 2018

Hi Andrew,

Thanks for getting back to me. We would like to take a closer look at this - can you make a ticket through our support portal with the information from this Community question?

https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner/server/support

Regards,

Josh

Suggest an answer

Log in or Sign up to answer