Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hi guys!, I'd need to find a queryr in order to include in a Plans filter

Nieves García April 8, 2023

for finding all Epics (from differents Jira projects) but with value of "Parent link", Initiatives of an unique Project.

 

3 answers

3 accepted

0 votes
Answer accepted
mauricio.groth
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 10, 2023

Hi @Nieves García 

I’m Maurício, a support engineer at Appfire and I’m here to help you. 

Unfortunately, using JQL of Jira, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find all the Epics which the ‘Parent link' is an initiative of the project MT-Feel.

issue in childrenOfIssuesInQuery("project='MJP' and type=Initiative") and type=epic

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

Best regards,
Maurício

Nieves García April 11, 2023

Hi @mauricio.groth !, Thanks in advance for your support.

Let me share with you that I found a solution , using the function,

 LinkedIssuesofrecursive(subquery, [link name..])

In my case,  issueFunction in linkedIssuesOfRecursive("project = MTFEEL", "is parent of")

 

Thanks & best regards,

0 votes
Answer accepted
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 9, 2023

Hi @Nieves García 

unfortunately, this is trickier than one might think; as a "hierarchical query", it would really require some kind of "join" or "subquery", which isn't available in plain Jira/JQL.

A few directions forward:

  • If it's a one-off thing, you could first query the relevant initiatives, and then use the keys of these initiatives in a second query, in an ""Parent link" in (KEY-1, KEY-2, ...)" clause.

If you want to run your search "dynamically", without manually "stitching" two queries together, you'll need extra tooling:

  • You might be able to use Jira Automation to "propagate" initiative information down to the epics, and then use the respective field(s) on the epics to include them into your filter. Obviously, this will add a fair bit of complexity to your system.
  • There's different apps from the Atlassian Marketplace that can help with that. First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. I've used JQL Search Extensions a few times and it works well.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve - I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 9, 2023

Just to expand on the last point, this is how this would look in the app that my team and I are working on, JXL for Jira. Put simply, you create a sheet with all your relevant initiatives and any potential epics below these initiatives. You then configure your hierarchy (that's just a couple of clicks) and hide all issues that exist "outside" of this hierarchy:

initiatives-of-certain-project.gif

Once you have your set of issues, you can work on these issues directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

Any questions just let me know!

Nieves García April 9, 2023

Hi @Hannes Obweger - JXL for Jira ,

Firstly, thanks for sharing all of those alternatives. Great help for me!

What a pity!, I'd need showing up all the Epics which 'Parent link' is a initiatives of the project M-Feel.

I mean, you guy know, showing in a Plans all the initiatives of MT-Feel project and in cascade with their epics (whatever project belong)

I thought that exists some Jira functions for that,(  e.g linkedIssues(), epicsOf(),...) which could answer if its project parent link is MT-Feel or something like that...  :(

Kind regards!

Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 9, 2023

@Nieves García yeah understood - I believe you should be able to do this with a Marketplace app. 

Another thing I could think of is to create a Advanced Roadmaps plan with two filters: One filter that pulls in all your initiatives from MT-Feel, and another filter that pulls in any potential epics (from any projects you generally care about). Advanced Roadmaps should then show the epics under their initiatives, and all other epics in a special "Issue without parents" bucket that you can just ignore.

This is similar to how it would be done in JXL, except that JXL has an option to completely hide any "issues without parents".

Nieves García April 10, 2023

Hi @Hannes Obweger - JXL for Jira , thanks a lot for your ideas and comments. It was great help for me.  Finally, I found a solution , this is using the Function,

LinkedIssuesofrecursive(subquery, [link name..]),

this function traverses issue links recursively to return all issues that are linked (directly and indirectly) to the results of the initial subquery.

In my case : issueFunction in linkedIssuesOfRecursive("project = MTFEEL", "is parent of")

Thks & Best Regards,

0 votes
Answer accepted
Javad Farahani April 9, 2023

To find all Epics from different Jira projects with a specific value for the "Parent link" field, linked to Initiatives of a specific project, you can use the following JQL query:

java
Copy code
project in (<project1>, <project2>, ...) AND issuetype = Epic AND "Parent link" in (project = <initiatives_project>) AND "Parent link".issuetype = Initiative
Make sure to replace <project1>, <project2>, ... with the project keys of the Jira projects where you want to search for Epics, and <initiatives_project> with the project key of the project where Initiatives are stored.

This query will search for all Epics in the specified projects that are linked to Initiatives in the <initiatives_project> project via the "Parent link" field.

You can save this query as a filter in Jira and use it as a basis for your Plans filter. Note that the Initiatives project should also be added to your Plan in order to use this filter.

Nieves García April 9, 2023

Hi Javad, thanks a lot for your answer. But let me explain in more details what I need,

I have a 'jira project', MT-Feel, with Initiatives and epics included under them. But, those epics can belong others jira projects that for starting I don't which are...

I mean, I'd need to show all Initiatives of jira project (MT-Feel) with its Epics included whatever project belongs (not only from MT-Feel).

 

Thanks in advance!,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events