Forums

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

JQL for selecting issues with components that don't have a lead

Zoltán Lehóczky
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.
October 25, 2022

I'm working on a filter that'll show issues that you should review. I'd like to achieve that it'll show issues if any of the following match:

  1. It's in a project led by you and there are no components selected
  2. It's in a project led by you, has components selected, and none of the components have leads. We assume that if a component's lead is empty then the project lead is the component lead.
  3. It's in any project, has components selected, and any of the components are led by you.

Note that this excludes issues that are in a project led by you but that have only components selected that are led by somebody else.

I'm here currently with my JQL:

status = Done
AND assignee != currentUser()
AND ((project IN projectsLeadByUser() AND component IS EMPTY) OR component IN componentsLeadByUser())
ORDER BY updatedDate ASC

This fits criteria #1 and #3 but not #2. I'd essentially need something like componentsLeadByUser(EMPTY) (but this is not available).

Do you have a suggestion on how to achieve #2? Thanks in advance!

1 answer

1 accepted

0 votes
Answer accepted
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.
October 25, 2022

Hi @Zoltán Lehóczky 

I do not believe that is possible with out-of-the-box JQL features.

The function componentsLeadByUser() assumes the current user when no one is specified, and there does not appear to be a function to find the inverse: find all components without a lead...which are assigned to issues. 

And because components are project-specific, I do not believe there is an easy way to gather all of the components without leads for use in a hard-coded query, such as component IN (noLeadComponentA, noLeadComponentB, etc.)

Your query may require a marketplace addon to enhance features of JQL or reporting.

Kind regards,
Bill

Zoltán Lehóczky
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.
October 25, 2022

I see, thank you. Do you happen to know if an add-on would support something like this? I looked through the JQL-related add-ons in the Marketplace, and JQL Tricks Plugin with jqlt.components.leads might; I've written them to chime in here. I couldn't find any other.

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.
October 25, 2022

I do not know of any specific ones.  For the marketplace ones you find, they each have a support tab showing their documentation.  I recommend taking a quick look/search of those to see what is available to help.

Zoltán Lehóczky
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.
October 25, 2022

Yeah, that's what I did and how I arrived at the mentioned JQL Tricks Plugin. I'll wait for their answer.

Like Bill Sheboy likes this
Zoltán Lehóczky
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.
October 27, 2022

It's not possible with that add-on either right now, but it's a feature that can possibly be added. So, for now, the overall answer is "this isn't possible, not even with an add-on".

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events