How would i be able to create a calculated field in Jira?

Kirsty Mcloughlin November 19, 2020

I would like to create a field in Jira that automatically populates with a value depending on the the values of other custom fields. Please see the attached picture. I would like to work out the cost of a resource depending on role, number of days, price per day and number of weeks required. 

For example; a Business Analyst is £360 a day, needed for 2 days per week for 10 weeks. So the total cost is £7,200.Jira snip 1.PNG

1 answer

0 votes
Ravi Sagar _Sparxsys_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2020

Hi @Kirsty Mcloughlin 

This is possible but you would need an app like ScriptRunner for Jira for doing calculations.

In your case.

  • Create field1 "Days per week"
  • Create field2 "Number of weeks"
  • Create a field3 "Roles" of type select list
  • Using ScriptRunner create a Scripted field called "Total cost" and you would need to write a script to perform this simple calculation.

Take a look at this page where you will also find examples.

Ravi

Kirsty Mcloughlin November 19, 2020

Thank you! 

 

Just another question, do yo have a script for adding the value in custom fields together? 

Nic Brough -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.
November 26, 2020

Suggest an answer

Log in or Sign up to answer