The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Automatically add 'blocks' and 'is blocked by' based on rank

Paul Farrell
Contributor
February 6, 2019

Hi - hoping someone might be able to help.

 

I have a Kanban board with a backlog column. For reasons specific to my way of working, each issue (or task) in the backlog is blocked by the one above it and blocks the one below it. 

As it's a Kanban column, we can move the issues around and re-prioritise them. Currently, when we re-prioritise an issue by dragging and dropping, I then have to manually update the links accordingly. 

Does anyone know if there might be a way to automate such a manual task. So when an issue is re-prioritised (by dragging and dropping) it is automatically set to be blocked by the one above it and block the one below it?

I guess I was thinking Scriptrunner or similar?

The reason I want this is so Portfolio for Jira can automatically schedule tasks based on their rank in the backlog. Portfolio for Jira relies on having the 'blocks' and 'is blocked by' links set up. Otherwise it just schedules things at the same time.

I hope you can help. 

 

Many thanks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
MouazzeM
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 28, 2024

Step 1: Access Jira Automation
Go to your project.
Click on Project Settings > Automation.
Click Create Rule.

Step 2: Set the Trigger
Choose the trigger "Issue Updated".
Add a condition to narrow the scope:
Select Field Changes.
Choose the Rank field (this tracks the position of the issue in the backlog).

Step 3: Add Branch for Linked Issues
Add a Branch Rule / Related Issues component.
Select For Parent Issues or For JQL to dynamically query neighboring issues.
Example JQL for neighboring issues:
text
Copy code
project = YOUR_PROJECT_KEY ORDER BY Rank ASC
This query assumes you want to manage "blocks" links dynamically.

Step 4: Update Links
Add Edit Issue actions within the branch.
Configure the "Blocked by" link to point to the issue above.
Add another action to set the "Blocks" link to the issue below.

Step 5: Test and Refine
Save the rule and test it by dragging and dropping issues in your backlog.
Check if links are updated correctly.

I hope, this answer will be helpful for your asking question.