Forums

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

JIRA Automation using JQL not applying for all JQL results

Pierre Ibrahim
Contributor
December 29, 2023

Hello,

I have a JIRA automation setup in my DC instance of JIRA and the automation is pretty straightforward, it runs a JQL every hour, and for any result, it triggers a transition:

jira automation atlassian.png

The transition has no conditions or validators, it is accessible from all statuses for the issuetype I'm searching for.

The JQL on my testing returned 18 issues, when the automation runs, only 15 issues get transitioned, if I re-run the automation again, the remaining 3 will get picked up and transitioned, I've attached a screenshot below of my automation's log, these runs were triggered back to back manually.

jira automation atlassian 2.png

Any guidance on why this could be happening would be greatly appreciated!

2 answers

0 votes
Craig Nodwell
Community Champion
December 29, 2023

Hi @Pierre Ibrahim this is very interesting.  Your jql gets cut off can you send another shot of that.  I'd like to try and mimic this behavior in my test instance as it doesn't look complicated.  Maybe there's more to what @Joseph Chung Yin is leading to above.

Pierre Ibrahim
Contributor
December 29, 2023

Hi there,

Absolutely, and thank you so much for responding, I greatly appreciate it!

The JQL is below:

project = OGCI and issuetype = Story and resolution is not empty and (issueFunction in linkedIssuesOf("resolution = Unresolved", "is depended on by") OR issueFunction in linkedIssuesOf("resolution = Unresolved", "blocks") OR issueFunction in linkedIssuesOf("resolution = Unresolved", "is child of") OR issueFunction in parentsOf("resolution = Unresolved")) and (issueLinkType in ("is dependent on","is blocked by","is parent of") or issueFunction in hasSubtasks())

The purpose of it is to find Stories that are resolved yet that have one of three types of links or subtasks that are not resolved. You would need the scriptrunner plugin to get access to the issuefunctions in my JQL.

Thank you!

0 votes
Joseph Chung Yin
Community Champion
December 29, 2023

@Pierre Ibrahim -

Your rule seems to be good, however it may be a timing issue.  When you execute the JQL outside of the rule, can you confirm that it returns 18 rows?  The reason I am asking this is that issues content can be dynamic, so the # of rows returned from your JQL will change automatically every time when it is ran (via the rule or outside of the rule via the search UI)

Please advise.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Pierre Ibrahim
Contributor
December 29, 2023

Hi there,

Thank you so much for responding, I greatly appreciate it! I tried running the JQL a bunch of times to make sure I'm always getting the same results, even when I "validate jql" in the trigger, I always got 18 issues.

I am able to re-test this as many times as I wish since the automation puts the tickets to "In Progress", and all I need to do to get them back on the JQL is to set them to done.

Worth noting that this is a test environment, so no one else was touching these tickets as I was working on the automation.

Thank you

Suggest an answer

Log in or Sign up to answer