Script Runner: escalation service only works when previewed

Hi,

I am using the escalation service to transition issues. I have a JQL query which selects the issues to transition. The strange thing is that the query returns no results when the service runs (although it should). Previewing the service works fine.

To make sure nothing is wrong with my query, I changed it to issuekey = CSD-21. Below the log of a preview of the service and then the actual execution. Notice that there are no issues found during the service execution.

I am using the same user to execute the service as I am previewing the service with. This user has administrative privileges and can do everything with the issue.

Any ideas?

2014-10-16 11:56:33,722 http-bio-8080-exec-15 DEBUG admin 716x8556x1 1qrhfiw 172.24.1.59 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.admin.EscalationService/params [canned.jira.admin.EscalationService] existing configs: 1
2014-10-16 11:56:36,406 http-bio-8080-exec-15 DEBUG admin 716x8558x1 1qrhfiw 172.24.1.59 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.admin.EscalationService/preview [canned.jira.admin.EscalationService] Execute service: Update support request
2014-10-16 11:56:36,406 http-bio-8080-exec-15 DEBUG admin 716x8558x1 1qrhfiw 172.24.1.59 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.admin.EscalationService/preview [canned.jira.admin.EscalationService] Issues returned by query (issuekey = CSD-21): [CSD-21]
2014-10-16 11:57:18,745 atlassian-scheduler-quartz1.local_Worker-1 DEBUG ServiceRunner     [canned.jira.admin.EscalationService] Checking the interval for service: Update support request at Thu Oct 16 11:57:18 CEST 2014
2014-10-16 11:57:18,745 atlassian-scheduler-quartz1.local_Worker-1 DEBUG ServiceRunner     [canned.jira.admin.EscalationService] run service Update support request: 1 elapsed
2014-10-16 11:57:18,745 atlassian-scheduler-quartz1.local_Worker-1 DEBUG ServiceRunner     [canned.jira.admin.EscalationService] Execute service: Update support request
2014-10-16 11:57:18,745 atlassian-scheduler-quartz1.local_Worker-1 DEBUG ServiceRunner     [canned.jira.admin.EscalationService] Issues returned by query (issuekey = CSD-21): []

3 answers

1 accepted

Ok, shoot me. Everything works just fine now. Sorry to bother you @Jamie Echlin [Adaptavist].

No worries ;-)

Hmmm....there is something very strange here. I changed back my original query and now I have the same problem again. I re-indexed, cleaned caches and restarted JIRA, but to no avail. 2 observations I have made analyzing the log: 1. in the log above, the EscalationService is executed by the user ServiceRunner. In my logfile a few lines further down, the user suddenly is admin (without anything changing). Since I changed my query, no user is displayed. 2. The escalation service is executed every minute. When it suddenly worked, the scheduler Worker thread changed. Especially the user seems suspicious, but I have no idea how to change that.

Seems odd - can you get your log file to me?

Hi Jamie, I am not able to get the log file today and next week I'm off. So I will get back to you on that.

Hi Jamie, it has been a while. I just reproduced the situation quickly: I first changed my query to have it return results, which it does in the preview. Then I updated the service (and the issues affected so they will be returned by the query). When the service runs normally, the query returns no results, although running the query manually does. I then changed the query to simply issuekey = <existing issue>. This works fine, both when previewed as when the service runs normally. Notice that the user changes when the service is executed. The log file is available through the link below, if you need more logging please let me know. Thanks in advance, Geert. Log file: http://we.tl/jlMrql2Tsk

I have tried different queries (with ScriptRunner JQL functions, without, start small, make it more complex etc.), but the results are simply non deterministic. I have seen a complex query with scriptrunner JQL function working, than I change one thing and it does not work anymore. It is really strange. Any help is greatly appreciated.

0 vote

What versions?

JIRA 6.3.8 Script Runner 3.0.6

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

82 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you