Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Formula Field

Fabio Rodrigues Oliveira May 5, 2022

Hello everyone,

 

How can I create a field and that does a certain calculation or formula, i.e:

("Enddate" "-" "Startdate" = "Qty number days") 

("2022-05-06" - "2022-05-05" = 1

2 answers

2 accepted

3 votes
Answer accepted
John Funk
Community Champion
May 5, 2022

Hi Fabio,

Create a custom number field first. Make sure it is available on the screen you are using. 

Then you can create an automation rule to populate the new field with the formula. 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/

Fabio Rodrigues Oliveira May 5, 2022

Hi John,

 

Tks for the answer...

 

Could you give me an example of how to create this automation?

John Funk
Community Champion
May 25, 2022

Here's some more information to help you get started:

There are two types of automation:

  • Global: In the Free version, you get 100 executions per product, per month
  • Project: In all versions, you get unlimited executions per month

Automation Basics: https://www.atlassian.com/software/jira/guides/expand-jira/automation

You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, go to Jira Settings > System > Automation Rules (left-hand menu).

For more on using Automation For Jira see these help pages.

Jira Automation Template Library to help get you started quickly:

https://www.atlassian.com/software/jira/automation-template-library#/labels/all/customLabelId/1453

2 votes
Answer accepted
Jack Brickey
Community Champion
May 5, 2022

Hi Fabio,

You can't create a field that performs any mathematical functions. However you can use automation which does provide for these math functions. I recommend you check out the automation documentation here - jira-smart-values-math-expressions 

Jack Brickey
Community Champion
May 5, 2022

yes...what John said. :-)

Like John Funk likes this
Fabio Rodrigues Oliveira May 5, 2022

Hi Jack,

 

Tks for the answer...

 

Could you give me an example of how to create this automation?

Suggest an answer

Log in or Sign up to answer