Jira Cloud - how do I filter on epics where custom field = xxx AND all child issues of these epics

Richard Johnson December 14, 2020

Here is a specific filter I am trying to create:

"Custom Field[Select List (multiple choices)]" in ("SomeValue")

This will return a few specific Epics.  This works, but I would also like to include the child issues of these Epics.  Currently, we do not copy the field value down from Epic to Child through automated actions or post functions.  I am currently using automated actions to achieve this, but I would rather not (See edit below).

Looks like others that have asked this have received responses pointing them to plugins for Server version.  We are on Jira Cloud.  I do not see plugins like scriptrunner, jql tricks, or jql search extensions for Jira Cloud.

Edit

For the time being, I have achieved this using two automated actions:

auto action 1.pngauto action 2.png

You can see I update the Epic's child issues if I change the field in the Epic, and I also update the field in the child when I create a child issue.  I dont like this method because there are so many ways to create/update issues and I have to create an automated action for each use-case. 

1 answer

1 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2020

Hi Richard,

I can confirm that in ScriptRunner for Jira Cloud you can search for issues located inside of an Epic using the issuesInEpics()  JQL function and this documentation page will show examples of how to use this.

Also,I can confirm that in JIRA Cloud you can only use the issueFunction() JQL function provided by ScriptRunner on the Enhanced Search page as described in the documentation here.

This is due to the way that Atlassian restrict how the JQL functions can interact with their infrastructure meaning we must run them in a sandbox process.

However this does not mean that they cannot be used inside other filters inside other filters or on filters for Agile boards, and to use the functions in other filters then you will need to follow the steps outlined below.

  1. Navigate to the enhanced search page and construct the filter you require using the JQL functions provided bv ScriptRunner.
  2. Save your filter and share it with the users that are required to be able to see it.
  3. Create the JQL search used by your board filter or quick filter and reference the saved filter using the syntax shown below which will return the results of your filter using the JQL functions provided by ScriptRunner.

filter = "<NameOfFilterHere>"

I hope this information helps.

Regards,

Kristian

Richard Johnson December 16, 2020

I was able to achieve this using scriptrunner with the following query.  First I had to build the inner query that would return all the Epics that had a custom field value of "Something":

issueFunction in issueFieldMatch("type = epic", "customfield_10111", "Something")

I named this filter "FilterName"

Note: customfield_10111 was populated after I selected the field I wanted from the drop down list.

Then I created the outer query that searched for issues within the Epics, and the Epics themselves:

issueFunction in issuesInEpics("filter = "FilterName"") OR filter = "FilterName"

I named this filter "MyFilter"

I could then build a filter using the following JQL:

filter = "MyFilter"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events