Hi everyone,
I've read many different answers on here but am still unable to get this automation rule to work. There are sequential issues within an epic. They are all linked to the epic. When the due date of an issues changes but a certain amount of time (e.g. 5 days, I would like to automatically change the other sequential issues by the same amount of time.
I keep getting an error message in the audit log (The duedate must be of the format "yyyy-MM-dd" (duedate)). I have gone to System - Look and feel and changed date format but this hasn't helped.
What do I need to do to the date format and how do I fix it?
Hello @Andrea Kargodorian
Welcome to the community.
In cases like this I find it useful to use the Log Action component to check what values I'm getting. So, I created a rule to be triggered like yours on a change to the Due Date field. Then I used Log Actions to check the value before the change, after the change, and the value that you are trying to use to set the Due Date in other issues.
In your rule, what you have written is attempt to set the Due Date field to the difference between the original and new values of the Due Date in the trigger issue. What you need to do is set the Due Date to the new date when that difference is applied.
I'm still working out how to do that myself.
Got it!
I opted to save the days of the date difference as a variable, before the For component.
Then in the For branch I use that variable to update the Due Date of the issue I want to change.
This is the whole rule...
You might want to add some extra checks to your rule to check if the date that was changed was originally blank, or if the date in the sibling issue that you want to change is blank. Those could cause problems with the .Diff and .plusDays functions.
Thanks to @Stefan Salzl 's response on this post for helping me figure it out.
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.
Hi @Andrea Kargodorian -- Welcome to the Atlassian Community!
With a rule of this type, which branches to any issues with the same parent epic using JQL...Have you confirmed that the date of the trigger issue is not also changing?
If it is, you may want to modify the branch to exclude the trigger issue from the results.
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.
How do I then make this rule also apply to the start date? i.e. the amount of change in the due date of the trigger issue is applied to both the due date and start date of related issues?
Thanks heaps - i've tried a few things and am not getting anywhere. The version below makes the start date go empty - but I thought this would be applying the 'amount of difference' = dueDateDiff to the start date of issues?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Andrea Kargodorian
To debug this I would encourage you to add Log Action actions before the Edit action to check the value of the Start Date field before you change it and print out the value you plan to assign to the field. Then show us the Audit Log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I appreciate the response but I am very beginner and am really looking for some extra hand holding to work through this issue. Are you able to provide the code on how to do this? or point me in the direction with someone who can help fix this issue?
Many thanks,
Andrea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At any point in your Automatin Rule you can add an Action called Log Action.
With that action you can log information to the Audit Log for the rule. You can add specific text and/or smart values.
You can use that to look at the values that you are using in comparisons in your Rule, and values that you want to assign to the fields, to make sure that the actual values are what you expect.
I recommend that you insert a couple of Log Action actions before your "Then: Edit issue fields" component. Use those to log the current value for {{issue.startdate}} and the value that you are trying to assign to the field.
That will help you make sure you have a valid value in "Start date" to begin with, and will show you the value you are trying to assign to that field.
Run your rule again and then check the Audit Log to see what the output is.
Report back to us showing the output sent to the Audit Log.
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.