I would like to do a date calculation to check how long a ticket stays within a status.
so I want to make the date now minus the start date and put it in a custom variable and always add that time to the existing one.
the syntax of the photo represents what I want, but I think it is wrong and it might not work.
any suggestions on how to do?
"Tempo Total em Aguardando Cliente"+(%%CURRENT_DATETIME%%-"Data Inicio Aguardando Cliente")
I can confirm that it would be possible this requirement using the ScriptRunner for Jira Cloud plugin.
To achieve this requirement you would need to create a Script Listener script which is configured to fire on the Issue Updated event.
The logic for the script would then need to get the current date as well as the values from the date fields that you require and to save these values into variables in your script.
You will then be able to have some logic to make the calculation that you require and will be able to update the issue to set a field with this value and I can confirm we have examples of updating an issue here which can be used as a reference.
I can also confirm that we have some examples from extracting the values from different field types and setting different field types here that you may find useful.
I hope this information helps.
Hi Atlassian Community! This is Teresa from the Atlassian team. My colleague Paul Buffington @Buff and I are excited to share a brand new ITSM resource we’ve created – "The Complete Guide to At...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events