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

Filtering based on linked issue status

Phil Barber March 30, 2021

Been trying to implement card colors on my board based on whether there is a linked issue for isBlockedBy with status != Done

Seems like this isn't possible but just wanted to check. [Using vanilla Jira with no ScriptRunner)

 

Here's what I've tried in the issue navigator:

`project = "TS" AND issueLinkType = "is blocked by" AND linkedIssue in linkedIssues(issueKey) ORDER BY created DESC`

but of course issueKey in linkedIssues(issueKey) is not defined. Is there a way to refer to the issue being searched in this way?

 

In the card color query I've tried 

`linkedIssue in linkedIssues(issueKey, "isBlockedBy")`

Again issueKey isn't a thing. I wasn't sure if in this view there is a keyword to mean "the current issue" but I'm assuming not.

Would be neat if we could do something like:

`issueLinkType = "is blocked by" AND linkedIssue.status != Done` ?

2 answers

1 accepted

1 vote
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.
March 30, 2021

Hi @Phil Barber 

JQL is not a SQL, so you will not be able to perform that type of two-level search without a marketplace add-on, such as the example you note of ScriptRunner.

What you could do is solve this with an automation rule, removing the links once a blocking issue completes.  For example:

  • Set your card color filter based upon: issueLinkType = "is blocked by"
  • Add an automation rule triggered on issue transition to Done, and delete any links which this issue blocked

If you need to see which issues were blocked/blocking in the past, you can refer to the issue history details.

Best regards,

Bill

Phil Barber March 31, 2021

Hmm yeah I didn't want to d that because of losing the link but you're right that the history would reveal it, if a little obfuscated... 

 

OK Thanks - I think I'll go with this. Appreciate the help!

Like • Bill Sheboy likes this
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.
March 31, 2021

Give that a try and see how it helps. 

If you later decide you really want to keep the links, this can also be solved using multiple automation rules to scan up/down the links to update a custom field, perhaps HasBlockingLinkedIssue.  Solutions like that tend to be brittle as the timing can cause automation loops.  Let me know if you want some ideas about that approach.

Best regards,

Bill

Phil Barber April 1, 2021

The solution I actually ended up with was to apply a label "Blocked" when an issue is linked with "is blocked by" and remove the label when an issue that "blocks" is moved to done/closed 

Like • 2 people like this
0 votes
Serena Yang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 6, 2024

The following logic means: list the JIRA issues where the linked type is 'created', the linked JIRA has the label 'abcd', and the linked issue 'resolution' status is 'Unresolved'.
(issueLinkType = created AND issueFunction in linkedIssuesOf("labels=abcd") AND issueFunction in linkedIssuesOf("Resolution = Unresolved") )  


Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events