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

ScriptRunner: Issue Links with Link Type & Name

Mia
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.
February 10, 2016

The ScriptRunner script JQL function of 

linkedIssuesOf(Subquery, [link name])

is good, but it isn't enough. Basically it can give me a list of issues and the issues that are linked to it, but not the link direction, such as BLAH blocks BLAH or BLAH is blocked by BLAH. 

Is there are a way of using the ScriptRunner scripted JQL functions to get this kind of information out and displayed in some kind of useful fashion so one doesn't have to individually clink on each issue to see the link direction. 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Steven F Behnke
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.
February 13, 2016

You can do that all with ScriptRunner. Please check out the documentation – https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_issue_links

These two are equivalent:

issueFunction in hasLinkType("Blockers")
issueFunction in hasLinks("blocks") OR issueFunction in hasLinks("is blocked by")
Steven F Behnke
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.
February 14, 2016

Sure, if it were absolutely critical that the information be displayed we could talk about those options. I understand now, thanks for the clarification. So, displaying of information – In JIRA we usually talk in terms of two objects, panels and fields. Currently, some issue details are added to the Issue View panel, but this isn't available during a query. Is that the case, that you're interested in querying on this data for filter, reporting usage?

In the case of Script Runner, you can write scripted fields with various scripting languages. Misc Custom Fields lets you write custom calculated fields with Beanshell scripting language as well. Both of these add-ons can be leveraged for different data purposes.

I think the main issue is that there's a billion ways to use Links and to display different data – How would you want this to work? What kind of slice of data are you looking for?

Mia
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.
February 14, 2016

With the issue filter view you can see the links key like ABC-123 but not the linked issue summary, which is what we're after in one view. As most staff won't know what the key is actually related to. 

This is primarily to help manage our backlog and see which issues are blocking which in a singular view without having to go between screens. 

I'm unsure how to link the issue summary to the issue key of the linked issue pulled from the query. 

Steven F Behnke
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.
February 14, 2016

It would be custom, no matter what. I think I understand what you're after though. It's worth some though, I'm curious what the best way to get this is...

TAGS
AUG Leaders

Atlassian Community Events