Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Question about Configuring a Custom Field Involving Math (Script Field)

Hello - 

I am attempting to start a project in Jira that involves a pool of money, represented by a number field called "Amount Available." The idea is that when tickets get created there is another number field labeled "Amount Spent" that gets populated in the workflow.

I'm wondering if it's possible to do 2 things. In my Amount Available field I want to have a number that I initially enter. When tickets get created, and when Amount Spent fields get populated, the Amount Spent numbers subtract from the number that I have entered in the Amount Available field. Ideally the Amount Available field would be present on the Dashboard.

I have never attempted to make such configurations in Jira, and am not sure if this concept is popular. I do have the Adaptavist Scriptrunner plugin, so I was thinking that maybe some kind of Script Field could achieve this. 


Any advice anyone may have would be much appreciated. Thanks.

2 answers

Following up to the post, and I have thought more about it -

The ideal situation would be to have a field called "Amount Deposited." The numbers on this field would add to the field "Amount Available."

The field "Amount Spent" numbers then get subtracted from "Amount Available."


I apologize for the wordy posts. Again, would appreciate any thoughts / help. Thanks!

Using scriptrunner : have an input field "Initial Amount", an input field "Amount Spent" and a calculated field (scripted field) "Amount Available" (=Initial Amount - Amount Spent).

Thanks for the response. I am attempting to configure what you outlined, but am struggling. My experience with Script Fields is more or less nonexistent. 

I have also been reading into JQL aggregateExpressions. It seems as though this concept can work as summaries of fields. If I am understanding the logic correctly, but theoretically I could calculate fields adding / subtracting from one another. 

Does this sound correct? 

So I've been researching further, and it appears that aggregateExpessions will not get me the solution. JQL is not capable of actually calculating any data, rather it's a means to filter through existing data.


I have tried to type up a Script Field, but I am getting errors with the example that you provided. 

The idea is that there are 3 fields: "Amount Deposited", "Amount Spent," and "Amount Available" - Amount Available would be the Script Field.

All values for Amount Deposited are added to Amount Available. All values for Amount Spent are subtracted from Amount Available.

Is such a Script Field possible?

can you share your script and error messages ?

Suggest an answer

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

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

200 views 6 7
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