Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

custom field for "is blocked"

Sarah Thomas
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!
November 10, 2022

I would like to add a custom field to the issues, which indicates whether the card is blocked by another card that is not yet marked "done".

Example: Imagine 2 story cards, Card 1 and Card 2.

Card 1 has a linked issue: "is blocked by" Card 2.

Card 2 has status "To Do".

This means Card 1 cannot yet be performed, as Card 2 is not "Done".

I would then like that there is a field in Card 1 that states

"IsBlocked"  = "yes" (or something similar to this)

I understand that  this is most probably using scriptrunner, but I don't understand how this works. I am using Jira Cloud (and have find relevant examples of scriptrunner for Jira Server that do not work).

Thankyou

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Champion
November 10, 2022

Hi @Sarah Thomas - You can accomplish this with native Jira Automation.  You'll require 2 rules:

RULE 1: Setting the IsBlocked Flag

  • TRIGGER: Issue Linked
    • Link Type = Blocks
  • CONDITION: Status != Done
  • BRANCH (Destination Issue)
    • ACTION: Edit Issue (IsBlocked)

RULE 2: Clearing the IsBlocked Flag

  • TRIGGER: Issue Transitioned
    • To Done
  • BRANCH (Linked Issues - Blocks)
    • CONDITION (Related Issues Condition)
      Adding this in case the issue has multiple blocks
      • Linked Issues
      • Is Blocked By
      • All match specified JQL
      • status = Done  
    • ACTION: Edit Issue (IsBlocked)

As an aside, you may want to consider simply using the native Flag feature rather than creating a custom field.

Sarah Thomas
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!
November 13, 2022

Thank-you so much; This is just what I needed. I needed to extend the idea a little with an extra rule, as a card can be blocked by multiple cards, so the second trigger instead for me triggers that when a card moves to "done", then each card that was previously blocked now runs a check to see if it is blocked by other cards.

The idea is the same though, so thank-you so much!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events