We have a need to keep track of how many days each developer has spent in an operational role supporting our support team versus how many days they have spent in a project role developing new functionality. The operational role is known as Primary Responder or P1
I have created a new card type, known as "People". I have created the following custom fields:
10131 P1 Days
10132 Joined Team
10133 Previous Team Days
10134 Previous Team Join Date
10137 previous P1 days
The automation rule looks like this:
1. When people card transitioned from x to y (statuses that I'm not delineating in this post)
2. and the Issue type = People
3. Then: Edit issue fields "Previous Team Days":
{{issue.customField_10132.diff(issue.customField_10134)days}}Description: Joined team date minus previous join team date in days
4. AND Edit issue fields "Previous P1 Days":
{{customField_10131}} Description: Copy P1 days to Previous P1 days
5. AND Edit issue fields "P1 Days":
{{customField_10133}}+{{customField_10137}} Description: Add Previous Team days to Previous P1 days
Now, something very strange happens. It works every other time, and fails every other time. However, there is an error message every time that says:
Failed to get value for issue.customField_10132.diff(issue.customField_10134)days: {{issue.customField_10132.diff(issue.customField_10134)days}}
So for testing purposes, I set the following:
Joined Team: 2021/04/20
Previous Team Join Date: 2021/04/18
Previous Team Days: 2
Previous P1 Days: 2
P1 Days: 2
So then, I would expect the progression to be:
2 2 2 (initial state)
2 + 2 = 4 (this works)
2 + 4 = 6 (instead I get 2 4 4)
On next move i get 2 + 4 = 6
Next move I expect 2 + 6 = 8, but I get 2 6 6.
So confused.