Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I want to make expression calculation with data to fill a customer field

varzinifilho July 31, 2020

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")

https://amerinodebrasil-my.sharepoint.com/:i:/g/personal/luiz_varzini_amerinode_com_br/EUeBiH73NYdNiKIeMsMtSnAB73Vo0uB2AwS3Z7EA6AvQiA?e=og7vnO

2 answers

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 6, 2020

Hi Varzinifilho,

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.

Regards,

Kristian

0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2020

Hello @varzinifilho 

Welcome to the community.

 

Unfortunately you can't make calculation with this post function, you will need an addon like Automation (this addon is available for all jira cloud instance) or Scriptrunner

Hope this helps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events