Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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 

Thanks Jamie

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

Regards,

Areg

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

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

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.

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

Yes looks like only option for now.

Suggest an answer

Log in or Sign up to
This widget could not be displayed.
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Delivery and Operations Teams can be more Effective and Profitable

    Managing services end-to-end, optimizing efforts to deliver the best services to customers. This is what team leaders and managers want to achieve. When using a tool like Jira, it...

28 views 0 1
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you