Forums

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

How can I create a filter that shows currentUser issues that are tied to an epic and...

Derek Bowes April 7, 2022

...that epic has a particular label?

3 answers

1 vote
Hannes Obweger - JXL for Jira
Atlassian Partner
April 9, 2022

Hi @Derek Bowes

just for a completely different direction: Is it a hard requirement for you to create this as a filter / JQL statement, or would it be okay to see these issues in some other form of list or table view? Because if that's the case, there would be a number of apps in the Atlassian Marketplace that would at least get you very close: I'm pretty sure you could model this in Structure, and it would definitively work in JXL for Jira (the app that my team is working on). What these apps (and several others) do is that they perform specific logic to establish parent/child relationships, in ways that isn't possible in plain JQL. 

If this is an option, I'm happy to elaborate on how this could work on JXL, and I'm sure people could speak for other apps, too.

Hope this helps,

Best,

Hannes

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2022

Hi @Derek Bowes 

You cannot perform a nested query like that with out-of-the-box JQL.  It is not a SQL and so doesn't have that feature.

If you need to do this type of query often please investigate one of the marketplace addon apps to enhance the features of JQL.

If you need to do this one time, you could first query to find the relevant Epics, grab their keys, parse them into a comma-separated values list, and then search for the linked issues with Epic Link.

Kind regards,
Bill

0 votes
Heather Ronnebeck
Community Champion
April 7, 2022

Hello and welcome to the community. 

You can try the following JQL in your advanced search. 

epiclink = "XXX" and assignee = currentUser() and labels = "XYZ"

Or if you are looking for any epic that is labelled and assigned to the current user, you can do the following:

epiclink is not empty and assignee = currentUser() and labels = "XYZ"  

The next step is saving the JQL to create a filter that you can reference later on in other areas of the application.

 

If you can share more information on your use case than I might be able to provide further assistance. But I hope these options help get you started on your final JQL. 

Derek Bowes April 7, 2022

Doesn't seem to do what I would like.

Use case:

We have epics that get tagged with a label "CapEx" so we can bill back to parent company. But only the epic gets the tag. Need to be able to see our individual issues that are tied to an epic with that label so we can add time. Right now we have to go to the issue, click the epic link to find out if it is tagged CapEx. So the filter would just show my issues with it's parent epic that has that tag.

Does that make sense? Does in my head. lol.

 

Thanks

Heather Ronnebeck
Community Champion
April 7, 2022

Thank you for the additional information. Are you using any plugins like Scriptrunner?

Derek Bowes April 7, 2022

We are not

Heather Ronnebeck
Community Champion
April 7, 2022

You might have to do this in two steps than sadly. 

The first step would be to pull in all of your CapEx epics. You will need a JQL similar to:

labels in ("CapEx","capex","capEx") and issuetype = Epic


Note: The different versions of CapEx is because labels are case sensitive and this will catch more of your possible use cases. 

You will need to save this as a filter so you can reference this in your second query. I would save it as something like "CapEx Epics" so you can reference it later

You will probably need to export this list as a CSV to get the ticket numbers only in an easier format. 

The second step would be to run a JQL similar to this one:

"Epic Link" in (key-1,key-2,etc) and assignee = currentUser()

This will pull in all of the child tickets from that first list. You'll need to put a comma between each ticket number. If you're savvy at excel you can probably get this done with the CSV file so it's a copy and paste job.

I hope this helps.

Derek Bowes April 8, 2022

Thanks for trying Heather. This is ongoing, used all the time, so that 2nd step would not be practical. I guess Bill is correct in that it can't be done out-of-the-box.

Heather Ronnebeck
Community Champion
April 8, 2022

I guessed that in your situation, it was ongoing.

Like I said I used to have to do that process on a monthly basis at my old employment because we didn't have Scriptrunner installed at the time. I managed to create a formula with some help from the excel wizards to automate a bit of the key pulling process so it was an easier copy and paste.

I can continue to look for the excel part of the workflow I used to do and recreate that for you. 

I also had a list view created with only the key columns I needed so I could reuse the csv file for other reports I had to create off of the same data. 

Derek Bowes April 8, 2022

No, it's OK. Appreciate it though.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events