It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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.

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Desk

The Complete Guide to Atlassian for ITSM

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...

1,105 views 7 16
Read article

Community Events

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

Events near you