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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,557,528
Community Members
 
Community Events
184
Community Groups

How to search all linked issues with issues from specific project and with specific link type

Petr Vaníček
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.
Mar 07, 2019

Hi,

I got interesting question from my collegue, but I'm not sure how to procede his request.

By my short testing with JQL I found this:

issue in linkedIssues(DEFDEV-644) 

But I need something like this (not working JQL - just idea behind it. So I want all issues from all project where are issues linked with any issue in project DEFDEV by link issue type "Realized by".

issue in linkedIssueProject(DEFDEV) and linkType = "Realized by" 

 Do you have any idea ho to do this (with or without add-on - doesn't matter).

Thanks

Petr

6 answers

1 accepted

3 votes
Answer accepted
Jean-Théo _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.
Mar 07, 2019 • edited

Hello Petr,

You can do this if you have Scriptrunner installed:

https://community.atlassian.com/t5/Jira-questions/How-to-find-all-issues-that-have-a-link-type-CLONE/qaq-p/32959

issuefunction in hasLinkType("Cloners") and issue in linkedIssues(DEFDEV-644)

 You just need to change the link name!

Hope this helps,

JT

Petr Vaníček
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.
Mar 07, 2019

I think it's not what he need. 

He need issues from whole Jira which are linked with any issue from specific project by specific link type.

I just tried look into Scriprunner documentation, but I'm not sure which JQL function use for this use case.

Jean-Théo _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.
Mar 07, 2019

I think I misunderstood your initial question, it is clearer now!

The function you need is probably linkedIssuesOf.

You can achieve what you need with something like :

issuefunction in linkedIssuesOf('project = projectName', 'is cloned by')

 But this function uses a one direction link, if you need both directions, you can use something like :

issuefunction in linkedIssuesOf('project = projectName', 'is cloned by') or issuefunction in linkedIssuesOf('project = projectName', 'clones')

I hope this answers a little more your question! 

Like # people like this
Petr Vaníček
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.
Mar 07, 2019

It looks like it's exactly what we want, thanks.

Like Jessica Borges Alves likes this

I actually find a easier way to find the linked items just by adding the links column on my search result. 

Thanks for all you suggestions. 

Hello Everyone!!!

I wanted to build on this query but I'm not sure if it is possible in Jira Server 7.13.

issue in linkedIssues (XYZ-2222) AND project = "Product Management"

This gives me any linked issues in XYZ-2222 but only those Issues in the Product Management Project.  Thanks for posting this answer!


I wanted to take it a step further,  For the results of this query I want to see any Tasks/SubTasks, I tried using the parent() function but I wasn't able to nest it properly.  

Is this possible out of the box? 

Does anyone have any suggestions on how to do this?

Great !, I found this answer just at the right time. It works perfectly.

Thank you !

issue in linkedIssues("<ID of the ticket>","<link type>")

 

for example:

issue in linkedIssues("PROJ-123","parent of")

Shows all the tickets which are child of PROJ-123

When I tried this, I am getting error 'Issue link type 'parent of' could not be found in function 'linkedissues'

 

But the below one worked

issue in linkedissues("proj-123")

With the "linkedissues("proj-123") you get the ticket as soon as it is somehow linked to the proj-123.

if you want to specify which relation, you gotta type it (check that the relation is spelled like that in your project, or it exists)

Hi,

I am trying to build search filter with JQL query where I need to see the list of all link items for specific sprint. Any idea how i can accomplish this task?

 

Thanks

@Sutapa Basu 

sprint = XXXXX

You will need to find the Sprint ID and this will give you all Jiras in that Sprint.

You can also see if it will autofill so if you type sprint then choose = and begin to fill in your sprint name it might autofill.  

Hope that helps

Thanks, I understand the sprint= SprintID will give me all the items in the current sprint, but I like to if there is any prior linked item for any of the item listed for the sprint.

 

Thanks

@Sutapa Basu 

Try 

issuefunction in hasLinkType("Link") AND Sprint = XXXXX

 

I would do "Sprint is not EMPTY" so it shows everything and then I would narrow it down

Let me if that works

I know that this is now 2022 and the question was asked in 2019, but JIRA now offers JQL to search by a specific link type. For example, I needed to find all the tickets that are owned by CRM-209 and this is the JQL that does that: 

project = "CRM" AND issueBelongsTo = "CRM-209"

Like # people like this

Suggest an answer

Log in or Sign up to answer