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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

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.



Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

196 views 1 6
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