Hi
Hope everyone doing well
In my project I have task under these tasks the subtasks are created automatically where start dates and due dates of subtasks are also created automatically by setting the value of the fields in automation
Now for example I created the task
Subtask 1 (start date 2 jan , due date 4 jan)
subtask 2 (start date 3 jan , due date 5 jan)
and so, on
there are so many subtasks like this where start and due dates are automatically generated
Now what I want if change the due date for any of the subtask the remaining subtasks start date and due date automatically change.
I am not sure how to achieve this
I am using jira cloud
Hi @Umar Maroof
This requirement of your was a nice exercise for me! It was a bit tricky to accomplish that, but everything turns out great! You can create the following rule which I'll explain just below:
When the Due date for a task issue type is changed, then Start Date and Due Date of all subtasks to that task will be increased or decreased by the same amount of difference between the new and the old task's due date. |
{{fieldChange.fromString.toDate.diff(fieldChange.toString.toDate).days}}
Some things to take into account:
Let me know if that works for you.
Thanks for your time
I did this automation
But when I cahnges the due date for tasks the subtasks start date and due date will become 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Double check that the values you enter on edit issue component are correct. E.g. issue.Start date is different that issue.startdate. This will result in entering a null value => 0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great its work fine now
Thank you so much for your help......!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kindly mark my answer as accepted in order to help others! Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Koxaras -Relational- I have one more question regarding to this automation
can we did this for link issues for example I have 3 subtasks
subtask 1
subtask 2
subtask 3
Subtask 2 and 3 are blocked by subtask 1
Now same like this automation when we change the due date for subtask 1 the start and due date of subtask 2 and 3 will change
can we achive this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Umar Maroof you don't have all the requirements for this change yet. You could perhaps achieve this by creating another rule, but it's not that simple.
From the basic rule, if you change the due date, then it will change the dates for all subtasks below (namely 1,2 and 3). Then the new rule will be triggered and change again subtasks 2 and 3, because subtask 1 was changed...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Koxaras -Relational- I want to do the second part sperately Like I just want to change the subtask 1 due date and it will change the start due dates for his link issues (that are blocked by subtask 1 i.e 2 and 3)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Alex Koxaras -Relational-
I used the Automation rule shared here - thank you.
For the "Start date" the automation did not work (updated "Start date" to empty value) when User was using Jira in language different than English (in English automation rule worked fine).
I got suggestion from support to change how the difference variable is calculated to:
{{fieldChange.from.toDate.diff(fieldChange.to.toDate).businessDays}}
Use "from" instead of "fromString" and "to" instead of "toString" the format conversion probably caused the problem.
Anna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Anna I'm getting empty values for both Start and Due dates when using the automation so was looking into using your version of the variable. Where did you put start and due date within that code, does it replace fieldChange?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Umar Maroof ,
best wishes!
You could use Automation for that as well, but the most important part is figuring out your logic first (if the date of an issue changes, how do the other dates need to behave?)
For an easy example, let's just say that you need the other issues to add a few days to the date you just set yourself.
Hope this helps!
- Tessa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Umar Maroof
You can also use for this automation and smart values. Please take a look on https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/#Manipulating-dates
Regards,
Seba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.