We have a project that has multiple levels of links called "Blocks"/"Blocked by". The users would like to change a due date or start date and have it cascade down the line updating the date fields.
For example, is issue #3 has the due date changed from 03/30/2023 to 03/31/2023, then the linked "Blocks" issues will all have their due date/start date increased by 1 day. Then any "blocks" issues they have will do the same.
I figured doing a issue_field_updated event would be best. The postscript could be "Set issue fields" and point to the blocks linked issues. However other options will work.
I put together a line of code that mostly works, but I need to access the "Blocked by" or triggered issue fields. I have tried a few things but I'm not able to get it to access the triggered issue fields.
{{issue.fields.duedate | dateadd( issue.fields.duedate | date('diff',issue | fieldHistory( "Due date") | last | field("from_string"),'days'),"d")}}
The above line works, however putting it in live would probably cause a loop.
It does the following:
1. Gets the previous "Due date" value
2. Finds the difference between the old due date and the current due date
3. Out puts the modified due date.
The problem of course is it's reading from the same ticket, where it needs to get #1 and #2 from the triggered issue, not it's self.
Any help please?
P.S. This document needs to be updated, I spent over an hour trying to figure out what was wrong with my code before I found out I needed to use dateadd(X,'days').
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.