Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

When updating a start or end date, I am trying to automatically adjust everything after that.

Joe Mraz August 22, 2024

I have a group of linked stories under an epic that have start and due dates. If I need to push out a due date I want the rest of the stories to automatically update their start and end dates to conform with that change and adjust by the same amount.

I am not sure how to build an automation like this and need some help.

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 22, 2024

Hello @Joe Mraz 

When you say the issues are linked do you mean that they are linked to each other? What link type(s) are you using? How are you indicating that the Start Date of Issue X is dependent on the Due Date of Issue Y?

How many such issues exist in your longest "chain" of such relationships?

 

Joe Mraz August 22, 2024

Hello Trudy. Basically, the stories are a phased approach in this case.  So story 1 is linked (blocks) to story 2.  Story 1 needs to be completed to work on story 2.  If story 1 needs to be extended, then I want story 2 to be pushed out but keep their current amount of time for story 2 but push it out. Then it would push out story 3, 4, etc, so that we make one update to a story timeline and the rest updates properly.

This chain is currently 10 stories.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 22, 2024

I have provided an example of how to do that with an Automation rule in my answer on this post:

https://community.atlassian.com/t5/Jira-questions/How-to-move-a-ticket-forward-in-timeline-when-is-blocked-by/qaq-p/2628902

Note that this rule needs to call itself recursively to go through the chain of linked issues. There is a limit of 10 such calls so if you have more than 10 issues in the chain following the first one you update, then the rule will update only the first 10. And you have to check the box on the Rule Details page to "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule."

Joe Mraz August 22, 2024

Getting some errors when from the audit log:

Failed to get value for (issue.startdate.plusDays(duration.asNumber)): {{issue.startdate.plusDays(duration.asNumber))}}

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 22, 2024

Where I used "startdate" or "Start date" or "duedate" or "Due date" or any variations thereof, you need to be using the names of your fields that you are using to indicate the beginning date and the ending date.

Joe Mraz August 23, 2024

I got it working now.  However, for the next story in line it only changes the start date correctly. The due date says "NO DUE DATE" which then erases the ones after the second story and so on.  Getting closer.  Any thoughts?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2024

Please show us the rule(s) you have created and the details of each step, plus the details from the audit log for execution of the rule(s).

Joe Mraz August 23, 2024

Here is part 1:

Joe Mraz August 23, 2024

Part 2: 

 

 

Joe Mraz August 23, 2024

Success Info from Log 1st one: Notice only the Due Date is there which correctly sets the start date on the next story

Joe Mraz August 23, 2024

Success Info from log 2nd one: Notice everything is blank

Joe Mraz August 23, 2024

Results: The 2nd story has the correct start date but due date is now saying NO DUE DATE

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2024

At this moment I'm not able to see/access any of the attachments you added to your post.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 23, 2024

Hi @Joe Mraz -- Welcome to the Atlassian Community!

In your rule's create variable action for "duration" you use this smart value expression:

{{issue.dueDate.plusBusinessDays(diff))}}

That is not valid as "diff" has no meaning / value there.

Were you trying to use the change in value for the Due Date of the trigger issue?  If so, that would need to be calculated from the changelog after the trigger and saved for later use in the branch.

Kind regards,
Bill

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2024

@Bill Sheboy 

(I don't know why I can't see the images from OP's most recent replies. I've tried three different browsers and an Incognito window.)

Adding context: OP is using an example from one of my previous answers as the basis for the rule. 

https://community.atlassian.com/t5/Jira-questions/How-to-move-a-ticket-forward-in-timeline-when-is-blocked-by/qaq-p/2628902

Like • Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 23, 2024

Thanks, Trudy!  

The definition of the duration variable and increment of the date seem comingled / different from your linked solution.  If they are separated again it should work, with the key being how much to increment:

  1. by the same amount as the trigger issue's due date change, or
  2. some other amount.
Joe Mraz August 23, 2024

@Bill Sheboy Hi Bill.  That did not change anything when I updated it.

@Trudy Claspill Hi Trudy, is there a way I can attach the files so you can see?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2024 edited
Joe Mraz August 23, 2024

@Trudy Claspill I did not upload.  I just cut and paste the pictures.  Is there a way to upload .jpeg files?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2024

Save a copy of the file on your local system then use the Insert Photos option to insert/attach the jpeg to the post.

Screenshot 2024-08-23 at 1.00.44 PM.png

Joe Mraz August 23, 2024

Rule Part 1 of 2.jpg Rule Part 2 of 2.jpg Success 1.jpg Success 2.png Result.jpg

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2024

@Bill Sheboy 's comment about your Create Variable action to calculate "duration" is wrong. Compare yours to mine from the reference post.

I used {{issue.Start Date Field Name.diff.(issue.Due date field name).days}}

I would amend that now to use the abs function also.
{{issue.Start Date Field Name.diff.(issue.Due date field name).days.abs}}

You used:

{{issue.dueDate.plusBusinessDays(diff)}}

That is an entirely different calculation to add a number of business days to the Due Date, with that number of days being specified by diff

 

Because of that problem your editing of the Due Date field in the Edit action will not be correct.

 

In addition, you may want to double check that the linked issue actually has a Due date value and a Start date value before you calculate duration and edit the issue.

Joe Mraz August 26, 2024

Still not working. I cannot set the Due Date. My logs show how many days that need to be added but it keeps saying NO DUE DATE.  Very frustrating.  Here is everything again because I made a lot of changes.  All my logs show data.  

 

Automation 1 of 2.jpg Automation 2 of 2.jpg Edit Issue Logic.jpg Logs.jpg

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2024

The use of field names in smart values can be space and case sensitive. Make sure that the field names you are using in the smart values match the field names you see in the UI for the actual issues.

I see a lot of placing where you are changing case, such as

TriggerIssue vs. triggerIssue vs. triggerissue (with a lower case "i" in the last one for "issue"

So I also recommend that you make sure the case on all those references is correct.

triggerIssue - lower case "t" and upper case "I" for "Issue".

When referencing the current issue in focus use {{issue.... with a lower case "i".

I also notice that you are trying to reset Due date based on Start date in the target issue.

Screenshot 2024-08-26 at 12.43.21 PM.png

Two things I would recommend with regard to this:

1. Don't use the focused issue's Start date as the basis for assigning a value to this field. At this point in time, the start date of the issue has not yet been changed so it is using the original Start date in the calculation. Instead use a reference to the trigger issue's due date, like you do when setting Start date. 

{{triggerIssue.duedate.plusDays(numberofdays)}}

2. Print that value into the Audit Log to confirm it is calculating correctly.

3. Also, I see that you are actually pushing the new Start date out by an additional day, so you need to factor that in to the numberOfDays calculation:

{{issue.Start date.diff(issue.duedate.plusDays(1)).days.abs}}

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events