Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script working while automation fails

Zoi Raskou
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 28, 2019 edited

Hello, 

I am creating an automation within Insight. I have tested the script with Insight Script Console and it works as expected, however the automation failing. 

The trigger I have set up is comment added and the condition is for objects within schema. 

I am trying to update an object when an JQL is true. 

I am using Jira 8 and this is the line when it fails

//line when code failes
def openIssues = SearchResults.search(user, query, new PagerFilter())

1 answer

1 accepted

0 votes
Answer accepted
Zoi Raskou
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.
April 3, 2019

In case anyone is looking for an answer, all you need to fix it is include the following line before the search : 

ThreadLocalSearcherCache.startSearcherContext()

Apparently you need to create new context for the search.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events