-
Bug
-
Resolution: Unresolved
-
Low
-
Minor
-
Jira Software, Jira Service Management
Issue Summary
An Automation rule is set up to update time tracking fields (Actual Start, Daily Time Spent, and Time Spent) using smart values. While the Daily Time Spent calculation and its absolute value appear to be correct, the Time tracking with Time Spent and Time Logged fields are being calculated incorrectly.
Steps to Reproduce
- Create an automation rule in Jira to update time tracking fields (Actual Start, Daily Time Spent, and Time Spent):
- When rule is triggered
- Edit issue field: Work Paused to
{{now}}
- Refetch issue data
- Edit issue field: Daily Time Spent
{{issue.customfield_id_for_Actual_Start_field.diff(issue.customfield_id_for_Work_Paused_field}}
- Log work:
{{issue.customfield_id_for_Actual_Start_field.diff(issue.customfield_id_for_Work_Paused_field).minutes.abs}}
- Refetch issue data
- Add to audit log: only diff:
{{issue.customfield_id_for_Actual_Start_field.diff(issue.customfield_id_for_Work_Paused_field)}}
- Add to audit log: diff with minutes.abs:
{{issue.customfield_id_for_Actual_Start_field.diff(issue.customfield_id_for_Work_Paused_field).minutes.abs}}
- Add to audit log: Actual start custom field value:
{{issue.customfield_id_for_Actual_Start_field}}
- Add to audit log: Work paused custom field value:
{{issue.Work paused custom field value: {{issue.customfield_id_for_Work_Paused_field}}}}
Retrieve field ids via: https://your-site.atlassian.net/rest/api/2/field and seach for the Actual Start and other fields (you might need to create similar custom fields to reproduce similar behaviour in case your project doesn't have them).
Expected Results
Given `Actual Start` date value was set to: Jan 05, 2025, 5:00 PM
Given `Now` retrieved value was set to: Feb 12, 2025, 5:59 PM
Log action only diff: 38 days 0 hours 59 minutes Log action diff with minutes.abs: 54779 Log action Actual start custom field value: 2025-01-05T06:00:00.0+0000 Log action Work paused custom field value: 2025-02-12T06:59:00.0+0000
Time tracking should be set to: 38 days 0 hours 59 minutes.
Actual Results
Time tracking set to the Time Spent value was set to:
22 weeks, 4 days, 59 minutes |
Possible Causes of the Behavior
- 54779 minutes correctly maps to 38 days 0 hours 59 minutes. But when setting time tracking isn’t treating 54779 as a number of minutes. Perhaps it’s treating it like a Date object, or a Unix Timestamp object, or something else instead.
- Jira Time Tracking fields may require a specific duration format and the plain numeric value 54779 could lead to incorrect interpretation.
- Minutes Treated as Seconds or Another Unit: interpreting 54779 as seconds rather than minutes that could introduce a significant discrepancy in the logged time, potentially converting seconds into other units.
- Time formatting
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- mentioned in
-
Page Failed to load
Greetings!
The likely workaround is to supply the units of measure when logging work time, as is required when a person does this with the UX work logging feature. And so this may be usage problem rather than a defect.
Kind regards,
Bill