Hi,
I'd like to automate the change in a "planned start" custom field (date type) of a ticket depending on the modification of the due date of this ticket, taking into account the estimated time necessary to complete the task.
Exemple :
Ticket_300, due date is Monday January the 20th.
Time tracking remaining estimate time is 1 week.
Custom filed "planned start" field is set at Monday January the 13th (1 week from the due date).
If I move the due date to January the 27th, I want the "planned start" custom field to be automatically updated to January the 20th because it has 1 week of remaining work.
=> Basically I need to subtract a duration from a date and I'm not sure it's feasible.
Especially that the field "issue.timeTracking.remainingestimate" can have multiple unit of time (week,days etc...).
Here is what I tried :
{{issue.dueDate.minusDays(issue.timeTracking.remainingestimate)}}
=> the automation works but no modification is actually made on the ticket.
Some help would be appreciated !
[EDIT]
I added a step where I converted the "issue.timeTracking.remainingestimate" variable into number of days and put it into a newly created variable called "DiffTemporelle".
Then the document suggests I can subtract a number of days from a date like that :
{{issue.dueDate.minusDays(DiffTemporelle}}
Which actually doesn't work...
For a question like this, context is important for the community to help. Please post the following:
Until we see those...
When you want that field to update based on a change to the Due Date, the rule could trigger on a change to the Due Date.
Next, the smart value {{issue.timetracking.remainingEstimate}} is the human-readable format of the value, such as: 3d 4h
Instead use the remainingEstimateSeconds attribute and divide to use minusDays(). And so the value to use is {{issue.timetracking.remainingEstimateSeconds}} divided by the number of seconds in a day for your estimates.
Finally, this will only be accurate and a moment in time as it is based on the Due Date and the current value of Remaining Estimate. Is that what you want to do?
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.