Forums

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

Scheduled trigger does not work but 'run rule' works

Kathi August 9, 2021

Hi there,

we created an automation rule in Jira (Data Center) using the 'Scheduled' trigger. The scheduled trigger is not working, no matter if we are using a cron expression or a fixed rate. But pushing the 'run rule' button works with the same configuration. 

We are using the plugin 'Structure' too and in the JQL of the scheduled trigger we're using it. 

Our JQL:

(project in ("X") AND "Initial System" in ("xxx", "xxx") OR issue in structure("Feature Structure", "child in [project in (projectA,projectB)]") OR issue in structure("Bug Structure", "child in [project in (projectA,projectB)]")) AND NOT status changed to ("In Testing") after -14d AND status in ("In Testing")

 

Error message in the Audit Log: 

Error running query for scheduled JQL trigger:"((project in ...)" - Failed to validate jqlFunction 'structure', possibly plugin supplying it had thrown exception. Check the logs."

 

Logfile:

2021-08-09 09:41:48,751+0200 automation-rule-executor:thread-2 WARN jiraautomation [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.

 

I've already googled a lot but I didn't find something useful. I'm really wondering why the scheduled trigger is not working but when pushing 'run rule' everything is fine. 

 

Automation for Jira Version 7.2.8

Jira Version DC 8.13.4

 

Some hints for us?

Thanks!!!

Regards,

Kathi

2 answers

1 vote
David Niro
Atlassian Partner
August 9, 2021

Hello Kathi,

David from ALM Works here.

It may be possible that Automation, the Generators creating the structure you reference in your JQL, is paused on one of the nodes for some reason.  Since you are referencing content within a structure, this would return an error as the structure would not have any content to reference.

To check this, you will want to run the JQL in Jira's Issue Search for each node individually.  It is important to use Issue Search in order to isolate the issue.  This will help in determining if the error is with Structure, or with Automation for Jira.

If the S-JQL fails in a specific node(s), it would be best to open a ticket with our support team via email support@almworks.com, or our portal support.almworks.com.  We can best assist you with identifying the cause there.

If the search works as expected on all nodes, then there is probably something happening in Automation for Jira that would require additional investigation.

Please let me know what you find during the initial investigation. I look forward to your feedback.

Best Regards,
David Niro
www.almworks.com

Kathi August 10, 2021

Hello David,

thanks for your answer. I tested the JQL in Jira's Issue search on both nodes in productive system AND on both nodes on our test environment and in both cases the JQL does work. So it seems I have to contact the Atlassian Support due to Automation for Jira. 

Thank you for your help!

Best Regards,

Kathi

David Niro
Atlassian Partner
August 10, 2021

Hello Kathi,

You are very welcome!  If there is any information we could help provide during the investigation, do not hesitate to ask.  We are always happy to help!!!

Best,
David Niro
www.almworks.com

Like Kathi likes this
1 vote
Lisa Grau
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.
August 9, 2021

Hi Kathi,

first thing: in your query, did you set the projects in single ' oder in "?

"child in [project in ('projectA', 'projectB')]" <- this should be the right one

What the error basically says, is that the JQL returns an empty set. Therefor a nullPointerException is thrown. Who is the executing user for your automation? Does the plugin have access to the structure?

Kathi August 9, 2021

Hi Lisa,

thanks for your reply.

The projects are set in single '. 

The actor of the rule is our 'Jira Automation User'. I granted the user view-access to the structures. And he has full permissions for the project.

The JQL returns a result. And as already mentioned it's possible to push 'run rule' successfully. That's really strange.

Like Dave Rosenlund _Trundl_ likes this
Lisa Grau
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.
August 9, 2021

Returning an empty set isn't always caused by a wrong JQL but also if one of the actors doesn't have the right permissions. That's the only thing I can imagine in your case.

Does the scheduled rule work if you put yourself as an actor?

Like Dave Rosenlund _Trundl_ likes this
Kathi August 9, 2021

No it does not work when I put myself or a collegue as an actor. I checked the permissions twice. If it's caused by the permissions the rule should not work with 'run rule' either? 

Like Dave Rosenlund _Trundl_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events