To create a new custom field calculated, we can use the addon of JIRA “JIRA Misc Custom Fields”. The plugin can be downloaded from: https://marketplace.atlassian.com/plugins/com.innovalog.jmcf.jira-misc-custom-fields/server/overview

Example of Custom Field that sum two different Custom Fields:

1.- Go to create new Custom Field. Select Type “Calculated Number Field”

2.- In the “description” of the new customfield set a formula like this:

<!– @@Formula:(issue.get(“customfield_12703”) != null ? issue.get(“customfield_12703”) : 0)+(issue.get(“customfield_12704”) != null ? issue.get(“customfield_12704”) : 0)

–>

Posted by:.

4 replies on “How to create a Custom Field calculated in JIRA with JIRA MISC addon

  1. Is there a way to refer to the fields with their actual names instead of customfield_12703. Because when we do a backup and restore from our prod environment, like to refresh our dev or stage environment, those custom field numbers are different. So it’s always a manual adjustment we need to make.

    Liked by 1 person

    1. In the case of a custom field, has the form customfield_xxxxx, where xxxxx is the custom field numerical ID, as seen in the URL when editing the field. Or, starting with JIRA Misc Custom Fields v1.6.2 or JIRA Misc Workflow Extensions v. 3.7.0, you can also use the “real name” of the custom field (as shown in the list of custom fields).
      https://innovalog.atlassian.net/wiki/display/KB/Using+issue.get(%3Cfield_name%3E)+in+scripts

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s