For an Issue List Widget, I currently have the following Custom JQL:
(issuekey in childIssuesOf("Release Management ####")) and type not in ("Subtest", Epic) AND status NOT IN (closed)
For the Smart Labels, I have the following:
Blocks: (issuekey in childIssuesOf("Release Management ####")) AND issueLinkType IN (blocks)
Blocked By: (issuekey in childIssuesOf("Release Management ####")) AND issueLinkType IN (is blocked by)
The problem is, if there are any open linked items, then the smart label shows. For each card in the list, and for each individual label, what I would like is that the label will not show if all of the linked items are closed. For example, if all of the linked items that are marked as Blocked By as Closed, then the Blocked By label should not show.
Hi @Ron B
To address this, ScriptRunner's custom JQL can be employed for smart labels. Two examples include:
For "Blocks" smart labels:
issuekey in childIssuesOf("Release Management ####") AND issueLinkType IN (blocks) AND issuekey IN linkedIssuesOf("status != Closed", "is blocked by")
For "Blocked By" smart labels:
issuekey in childIssuesOf("Release Management ####") AND issueLinkType IN (is blocked by) AND issuekey IN linkedIssuesOf("status != Closed", "blocks")
The linkedIssuesOf() function checks issues linked by a specified type, matching conditions like non-Closed status. These JQL statements ensure smart labels appear only when open linked issues match the specified link type.
As JIRA's native JQL limitations, which lacks the support for subqueries and dynamic status checks for linked issues. To get rid try ScriptRunner or similar plugins for advanced queries. The linkedIssues() function, for instance, only returns issue keys without enabling status filtering within a single query.
Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.