Forums

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

JQL Question

Sysad
Contributor
November 12, 2020

Hi Community

My question, this is natively not possible with JQL and may need SQL, and as we know it is not recommended to run SQL on Jira production DB.

But would like to get some inputs from you all on how to solve this. Maybe there is an add on or something

My requirement with approaches

I have a few issues (alerts from a monitoring system) being created in our service desk with the following summary

Issue 1-- summary ~ Blahblahblah 1234567 is OPENED

issue 2 ---summary ~ Blahbahblah 1234567 is CLOSED

Issue 3-- summary ~ Blahblahblah 8888999000 is OPENED

issue 4 ---summary ~ Blahbahblah 8888999000 is CLOSED

In each week, we at least get ~150+ alerts that are open and closed and some stay open until our engineers resolve the alert, and once resolved, a closed alert gets generated.

Once an alert with the same number has OPENED & CLOSED words in them, consider that alert has been closed in the alerting system

Apart from normal day to day activities, monitoring these alerts in jira and closing them manually in Jira is a BIG TASK for a few teams.

I can run a JQL to find issues with the same numbers in summary, like

Find all issues where the issue summary CONTAINS 1234567 and close them. If I do this JQL I get 2 issues which are these

Issue 1-- summary ~ Blahblahblah 1234567 is OPENED

issue 2 ---summary ~ Blahbahblah 1234567 is CLOSED

and ideally need to do the same for rest of them and it is a manual tedious work and no one would like to do, but

as an alternate approach, I can user script runner JQL functions with a regular expression like this 

issueFunction in issueFieldMatch("project = XX", "summary","Blahblahblah \\d{9} OPENED")

and this returns all issues with a summary containing "Blahblahblah followed by a 9-digit number and text OPENED. " and I can bulk close these or use script runner job to close them in a timely manner.

But I need some sort of mechanism to compare jql to find matching numbers in summary and close them and this mechanism should return two issues similar to this 

Issue 1-- summary ~ Blahblahblah 1234567 is OPENED

issue 2 ---summary ~ Blahbahblah 1234567 is CLOSED

and close them with a job or something.

This is something to do with comparing numbers in summary and show issues with matching numbers and also return all issue matching the same criteria .

 

If am thinking wrong, please point me in some sense.

Thank you

 

 

0 answers

Suggest an answer

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

Atlassian Community Events