The value of this read-only custom field is dynamically calculated from a custom mathematic or numeric expression.
It can be used to obtain a numeric value depending on the value of other fields in the current work item or in any other work item (linked work, sub-tasks, epics, stories, JQL selected work items, etc).
Create a smart number field
Choose the template
Just like for any other smart field, follow the steps outlined here: Create and configure smart fields and select the Custom smart number field template in the field creation assistant.
Once selected click on Next.
Provide the expression
Creating an expression from scratch might feel like a challenge, especially if you are not familiar with our expression editor (known from our app Jira Workflow Toolbox). But we have you covered!
Either start by looking at the built-in example expressions or browse through the use cases and examples we have collected for you at the bottom of this page.
Preview the output
Once you have provided the expression you can preview and validate the output by selecting an existing work item.
Number format pattern
If your smart field is being used to store a simple number (e.g. a dollar amount), you have the option to display the value just like you would expect it - by applying a custom Display formats.
You can even use emojis like 💵 💶 ⭐️ when selecting a custom format!
📚 Use cases and examples
|
Use case |
Parsing mode |
Expression |
|---|---|---|
|
General |
%{floor(avg(toNumberList(jiraExpression("issue.subtasks.map(i=>(Number(new Date())- Number(i.created)))"))))} |
|
|
General |
%{%{issue.status} = "Open" ? 0 : ( %{issue.status} = "Planning" ? 15 : ( %{issue.status} = "In Progress" ? 60 : ( %{issue.status} = "In Review" ? 70 : ( %{issue.status} = "Implementing" ? 85 : 100 ))))} |
|
|
General |
%{count(findPattern(%{issue.cfnnnnn}, %{issue.cfmmmmm}))} |
|
|
General |
%{{issue.dueDate} != null ? floor(max({issue.dueDate} - datePart({system.currentDateTime}, RUN_AS_LOCAL), 0) / DAY) : null |
|
|
Difference between the current day and the earliest sub-task due date |
General |
%{max(fieldValue({issue.dueDate},subtasks())) != null ? ceil(( min(filterByValue(fieldValue({issue.dueDate},subtasks()),!=, null )) - {system.currentDateTime}) / DAY) : null} |
|
General |
%{{issue.resolutionDate} != null ? (({issue.resolutionDate} - {issue.created})) : null} |
|
|
General |
%{max([{issue.cfAAAAA}, {issue.cfBBBBB}, {issue.cfCCCCC}, {issue.cfDDDDD}, {issue.cfEEEEE}])} |
|
|
General |
%{count(findPattern(%{issue.cfnnnn}, "."))} |
|
|
General |
%{count(filterByStatus(subtasks(), "Done, Completed"))} |
|
|
General |
%{count(filterByIssueType(filterByStatus(subtasks(), "Done, Completed"), "Sub-task, Sub-story"))} |
|
|
Jira expression |
issue.changelogs .filter(changelog => changelog.items .some(item => item.fieldId == 'customfield_nnnnn')) .length |
|
|
General |
%{%{issue.fixVersions} != null ? count(issuesFromJQL( "fixVersion in ('" + jiraExpression( "issue?.fixVersions?.map( v => v?.name).join(\"','\") ") + "') ")) : null} |
|
|
Jira expression |
issue.subtasks.length && issue.subtasks.map( s => (s.customfield_nnnnn || 0) * (s.customfield_ppppp || 0)) .reduce((a, b) => a + b) |
|
|
General |
%{sum([%{issue.cfnnnnn} = "Option 1" ? 1 : 0, %{issue.cfppppp} = "Option 2" ? 1 : 0 ])} |
|
|
General |
%{{issue.cfnnnnn} = null ? null : {issue.cfnnnnn} - sum( append(fieldValue({issue.cfppppp}, subtasks()), [0]))} |
|
|
General |
%{sum(fieldValue({issue.cfnnnn}, subtasks()))} |
|
|
General |
%{sum(fieldValue({issue.cfnnnnn},issuesFromJQL("project = DEMO and 'fieldName' is not empty")))} |
|
|
General |
%{sum(append(fieldValue({issue.timeSpent},linkedIssues("is blocked by")), [0]))/60} |
|
|
General |
%{%{issue.issueType} = "Epic" ? (sum(append(fieldValue( {issue.timeSpent}, issuesUnderEpic()), [{issue.timeSpent}] )) / 60) : null} |
|
|
General |
%{{issue.dueDate} != null ? max({issue.dueDate} - {system.currentDateTime}, 0) / DAY : null} |
|
|
General |
%{{system.currentDateTime} - {issue.created}} |
|
|
General |
%{sum(append(fieldValue({issue.originalEstimate},linkedIssues( "is blocked by")),[0]))/60} |
|
|
General |
%{sum(append(fieldValue({issue.remainingEstimate},linkedIssues( "is blocked by")),[0]))/60} |