Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
UI Text Box
sizemedium
typeinfo

Use case

Return the result of summing the multiplication of the field values of two Number fields in every sub-task of the current issue.

Expression

Create and configure a Smart field using this expression in Jira expression mode:

Code Block
languagejs
linenumberstrue
 issue.subtasks.length && issue.subtasks.map( s => (s.customfield_nnnnn || 0) * (s.customfield_ppppp || 0)).reduce((a, b) => a + b)
UI Text Box

Please, replace nnnnn and ppppp in the above expression with the IDs of the Number fields.


Page properties
hiddentrue
Feature

Field type

Smart number field

Parsing mode

Jira expression

Expression
Code Block
languagejs
linenumberstrue
 issue.subtasks.length && issue.subtasks.map( s => (s.customfield_nnnnn || 0) * (s.customfield_ppppp || 0)).reduce((a, b) => a + b)
UI Text Box

Please, replace nnnnn and ppppp in the above expression with the IDs of the Number fields.

Label
Use case description

Return the result of summing the multiplication of the field values of two Number fields in every sub-task of the current issue.

Complexity

 

Status
titleINTERMEDIATE
Â