Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The JIRA Misc Custom Fields plugin's objective is to provide several new types of custom fields for use in custom JIRA workflows (although at this time it only provides one), as well as useful JQL functions.

Included custom field:

  • Calculated Number Field : a calculated custom field returning a number (integer or float). It is a read-only field that returns the result of the evaluation of a formula, such as the addition of two other fields.

Included JQL function:

  • currentUserPropertyAsList : a JQL function that returns the value of a property of the current user, transforming comma-separated values into a list of values.

Installation

The plugin is a "type TWO" plugin, which means that the plugin can be installed by copying it to jira-home/plugins/installed-plugins or, better yet, using the excellent Atlassian Universal Plugin Manager.

Usage

Anchor
calculated number field
calculated number field

Calculated Number Field

  1. Create a new custom field, choosing "Calculated Number Field" for its type.
  2. During step 2, in the Description field, include the calculation formula using the syntax described below.
  3. Re-index your data, as JIRA will kindly suggest you to.

...

Code Block
<!-- @@Formula: (issue.get("customfield_10114") != null ? issue.get("customfield_10114") : 0) + (issue.get("customfield_10150") != null ? issue.get("customfield_10150") : 0) --> 

Anchor
currentUserPropertyAsList
currentUserPropertyAsList

currentUserPropertyAsList

The currentUserPropertyAsList function can be used in a JQL query in an "in" or "not in" condition. It takes one parameter: the name of a user property.

When running the search query, the function will grab the value of the user property and treat it as a comma-separated list of values.