Hi,
I need to create an automation in my Jira project that allows me to pick up the finish date of issues blocking another one and update the blocked issue to account for delays in its predecessors.
For example:
All issues A, B and C block issue D, which currently starts on 27/01/2023 and finishes on 27/02/2023.
What I would like to do is set a trigger on issue D so that
Or in other words, if Issue A (or B or C) change their finish date to 05/02/2023 due to a delay, then Issue D start date would move to 06/02/2023 (05/02/2023+1), and a duration of 1 month (Original Issue D finish minus start dates, so 27/02/2023-27/01/2023) is added to this date to give a finish date of 06/03/2023
Getting instructions of completing this would be amazing please.
As a bonus challenge, I would like to create a notification or alert when changing any issue finish date (A, B or C) to after the blocked by issue start date (e.g. Issue A finish date changed to 28/01/2023), that
Thank you very much!!!
I think this will do it. I haven't actually tested this yet.
1. Trigger the rule when the Finish Date of an issue is changed.
2. Execute a branch to shift to the issues that are blocked by the trigger issue (if any).
3. Create a variable for the duration of the blocked issue
4. Lookup up all issues that are blocking this issue, ordering them so that the one with the latest Finish Date is first in the list.
5. Check that there is at least one issue in the result set.
6. Check that the Finish Date of that latest finishing blocking issue is later than the Start Date of the blocked issue.
7. If so, then update the Start and Finish dates in the blocked issue.
(1) TRIGGER: Field value changed: Finish Date
(2) BRANCH: For Related Issues / Linked Issues
Link Type: Blocks
(3) ACTION: Create Variable
Name: dateDiff
Smart Value: {{issue.Start Date.toDate.diff(issue.Finish Date.toDate).days}}
(4) ACTION: Lookup Issues
JQL: issue in linkedIssues({{issue.key}},"is blocked by") and "Finish Date" is not empty order by "Finish Date" desc
(5) CONDITION: Advanced compare
First value: {{lookupIssues.size}}
Comparison: is greater than
Second value: 0
(6) CONDITION: Advanced compare
First value: {{lookupIssues.first.Finish Date}}
Comparison: is greater than
Second value: {{issue.Start Date}}
(7) ACTION: Edit issue
Field: Start Date
Value: {{lookupIssues.first.Finish Date.plusDays(1)}}
Field: Finish Date
Value: {{lookupIssues.first.Finish Date.plusDays(dateDiff)}}
For the bonus part, you could have an Automation rule that sends a notification instead of making a change, but I'm not sure of a way that a notification can "prompt" for a response that would then be able to trigger another automation rule. I will have to think about that a bit more.
Adding to Trudy's answer...
There are some things to consider for your scenario, so please decide what you want to do for at least these cases:
With your scenario you are essentially trying to re-create functionality normally in project management/dependency mapping tools. As a result, you will need to decide what you want to handle, or not.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.