Forums

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

How to enable ScriptRunner script in Automation Script Task without JQL?

Areg Vrtanesyan February 5, 2019

Hi

I am trying to create an Automation Scheduled rule which will run Groovy Script without running JQL.

In Script Console I can checl that all working ok and all log.warn() messages are printed out in log to trace various stages.

Once I copied same script to Automation Stage it does not run anything if I don't specify a JQL search which I don't need as I will do all in script.

Do I miss something?

Shall i assume that thare are some limitations for ScriptRunner task in Automation?

Choice "simply run the conditions and actions without providing issues" on https://docs.automationforjira.com/getting-started/triggers.html#scheduled

Regards,

Areg

Ref: https://scriptrunner.adaptavist.com/latest/jira/plugins/automation-for-jira.html

1 answer

1 vote
Jamie Echlin _ScriptRunner - The Adaptavist Group_
Atlassian Partner
February 14, 2019

Hi Areg,

I believe there's a bug on the ScriptRunner side, where if there is no issues returned then we don't run your script: https://productsupport.adaptavist.com/browse/SRJIRA-3302

Are you just using the rule for scheduling purposes? If so I'd suggest using a _Service_, which will let you run a script on a schedule: https://scriptrunner.adaptavist.com/latest/jira/services.html

Many people also use _escalation services_ for something similar: https://scriptrunner.adaptavist.com/latest/jira/escalation-service.html

cheers, jamie 

Areg Vrtanesyan _Work_
Contributor
February 14, 2019

Thanks Jamie

Sorry I can't accept answer as this is reported from my wrong account which is not accessible now.

Regards,

Areg

Jamie Echlin _ScriptRunner - The Adaptavist Group_
Atlassian Partner
February 14, 2019

No problem, I'm over getting rep on here ;-)

Areg Vrtanesyan _Work_
Contributor
February 15, 2019

Hi Jamie

I have tried Escalation Service but for some reason simple JQL {{project = PRJ}} which has results in issue search reports 0 issues in the Escalation Service when I try to manually run it.

Is there a trick to run Escalation Services?

Regards,

Areg

Areg Vrtanesyan _Work_
Contributor
February 15, 2019

Right - user issue ( https://community.atlassian.com/t5/Marketplace-Apps-questions/JQL-never-return-any-issues-in-Escalation-Service-Scriptrunner/qaq-p/737189 )

Looks like again, I can't set up to run it with no JQL.

So as same as in Automation I need to invent some kind of Issue and JQL which will always have 1 result output to run this only 1 time.

Jamie Echlin _ScriptRunner - The Adaptavist Group_
Atlassian Partner
February 15, 2019

If you just need a scheduler, then it's best to use a Service... I pointed to the doc in my original message.

Areg Vrtanesyan _Work_
Contributor
February 15, 2019

Yes looks like only option for now.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events