The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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 Champions.
March 28, 2019

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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 Champions.
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.

TAGS
AUG Leaders

Atlassian Community Events