Scriptrunner: How to pull query from a jira filter

Liam Cass May 25, 2022

I'm currently making an automatic email system, and would make it as easy to use as possible.

Within these emails, it includes results from multiple JQL searches. Within Jira, each search already has a filter created for it.

Currently, I am running these searches using a hard-coded string with the JQL search. (see below)
jql_search_1 = 'project = POP AND issuetype in ("SW Defect", "HW Defect") AND "Defect Type" = External'
jql_search_2 = 'project = PO%P AND issuetype in ("SW Defect") AND "Defect Type" = Internal'

I was wondering if there was a way to make this more dynamic, and, instead of hard-coding the search value, get the JQL search string from the associated filter?
So, instead of the above, it would look something more like this:
jql_search_1 = jira_filter_searchval1
jql_search_1 = jira_filter_searchval2
and it would retrieve the data from their respective filter?

1 answer

1 accepted

2 votes
Answer accepted
Liam Cass May 25, 2022

Suggest an answer

Log in or Sign up to answer