Is it possible to add or subtract the date/time from a custom field?
What is needed:
When the ticket is moved to a specific status we populate a date/time field (call it field A) using the smart value {{now}}. Later when the ticket moves out of that status, we get the difference between now and when the ticket entered the status, again using smart values.
(The problem is in this part) We need to then add up the difference that we just got to a date/time field (call it field
which already has a value.
Example:
- Field B value is 23.10.2022. 11:00
- Ticket moves to the desired status (Field A is filled in with 23.10.2022. 11:00) and stays there for 2 hours
- When ticket moves out of the desired status, we now have 2 hours
- Add those 2 hours to Field B
- Field B value is now 23.10.2022. 13:00
Any other suggestions that will solve this problem in a different way are welcome. Using a plugin is not an option.
I was looking into this document but I could not find a solution: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
Using JSON in the "Edit issue" module in automation rules is also considered.
We need all of this to be part of Jira automation since the calculation needs to be done real time for thousands of tickets.
Thank you very much for the help.