Comparing Due Date And Start date in Automation

Ezgi BAYINDIR May 10, 2024

I'm working in automation and it's not working as I want right now

If due date is changed and linked issue's start date is earlier then new due date we need to automatically change the linked issue's start date same as trigger issues due date 

 

image (18).pngimage (17).pngimage (16).pngimage (15).png

1 answer

0 votes
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.
May 10, 2024

Hello @Ezgi BAYINDIR 

Welcome to the Atlassian community!

The steps in your rule are conflating functionality for two different requirements. You stated your requirement as:

If due date is changed and linked issue's start date is earlier then new due date we need to automatically change the linked issue's start date same as trigger issues due date 

But the two steps where you are updating the linked issue start date and due date are not making dates the same as the trigger issue. Instead they are attempting to change those dates based on the number of days in the change of the trigger issue due date.

So, we need to clarify your requirements.

1. For the linked issue, do you want to make its Start Date the exact same value as the Due date of the trigger issue? Or do you want to change the Start Date by the same amount as the Due date of the trigger issue was changed?

2. You have a step to update the Due date of the linked issue, but you did not mention anything about that in your requirement. What is your requirement for changing the linked issue Due date?

3. Your current condition is using the value that you are assigning to your variable.

{{fieldChange.from.toDate.diff(fieldChange.to.toDate).days}}

That smart value is calculating the difference, in days, between the original Due date and the new Due date value of the trigger issue, and giving you a number of days. So, your condition cannot operate correctly as it is trying to compare a date (Start date) to a number of days.

If you only want to make changes to the linked issue when the trigger issue Due date is later than the linked issue Start Date, then you need to change your Condition step to this:

Screenshot 2024-05-10 at 8.26.56 AM.png

 

Ezgi BAYINDIR May 13, 2024

Hey Trudy,

Thank you for your answer. 

1. I  want to make its Start Date the exact same value as the Due date of the trigger issue

2. For due date I want to postpone it with the same amount of start date change. So I guess I have to set up a variable after start date action and add it to due date

3. This condition that you sent is actually what I'm trying to do in advance compare block. I wasn't aware of that we have "is before" option

So if my linked issue's start date is before than due date I I want to move it starting to trigger issue's due date 

I changed my condition as you send but I'm getting an error in audit log
image (19).png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events