Hi all,
I'm currently trying to understand how the Plans Timeline works. As far as I understand, changing task dates by dragging its timeslot in the Timeline DOES automatically change it in the Project > myProject > List, but the Original Estimate is unchanged. So you can have a task that takes 16 days in the timeline, but 3 days in the task list.
Here's an example:

I modified task 2.3 dates in the Timeline view, so it takes 17 days to complete.
Here's what it does in the task list:
As you can see, the dates are correct (they are the same), but the Original estimate is not (17 days vs 3 days).
So I figured I need a rule that triggers when either of a task dates are modified, and calculates the Original estimate by subtracting the Planned start to the Estimated end (two date picker custom fields).
I tried to make this with a rule that triggers when Planned start and Estimated end are modified (either manually by me or automatically by the Timeline changes), checks the dates are not empty and then make the subtraction with this:
Original Estimate
{{#=}} (({{issue.customfield_10176.diff(issue.customfield_10177).seconds}}) / 3600 ) {{/}}
with customfield_10176 and customfield_10177 being Planned start and Estimated end respectively.
This gave weird results at first, as it returned the difference between Dec 10th and Dec 11th (1 day) as 24 minutes, Dec 12th (2 days) as 48 minutes and so on, so I tried to solve it multiplying the result by 20 (24 minutes * 20 = 8 hours=1 business day), but this causes problems too (results now overflow).
How can I calculate the difference between two dates correctly? Or is there another way to link the Timeline modifications to the project task list successfully?