Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Scriptrunner: How to pull query from a jira filter

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

Suggest an answer

Log in or Sign up to answer

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