Breadcrumbs

Custom smart number fields

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.

Screenshot-2025-08-25_11h-37m.jpg

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.

image-20250825-095052.png


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

Average time since creation of sub-tasks

General

%{floor(avg(toNumberList(jiraExpression("issue.subtasks.map(i=>(Number(new Date())- Number(i.created)))"))))}

Completion percentage by status

General

%{%{issue.status} = "Open" ? 0 : ( %{issue.status} = "Planning" ? 15 : ( %{issue.status} = "In Progress" ? 60 : ( %{issue.status} = "In Review" ? 70 : ( %{issue.status} = "Implementing" ? 85 : 100 ))))}

Count frequency of a keyword in social media content

General

%{count(findPattern(%{issue.cfnnnnn}, %{issue.cfmmmmm}))}

Days until due date

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}

Elapsed time between creation and resolution

General

%{{issue.resolutionDate} != null ? (({issue.resolutionDate} - {issue.created})) : null}

Highest value out of several fields

General

%{max([{issue.cfAAAAA}, {issue.cfBBBBB}, {issue.cfCCCCC}, {issue.cfDDDDD}, {issue.cfEEEEE}])}

Number of characters in a field

General

%{count(findPattern(%{issue.cfnnnn}, "."))}

Number of sub-tasks based on status

General

%{count(filterByStatus(subtasks(), "Done, Completed"))} 

Number of sub-tasks based on status and work item type

General

%{count(filterByIssueType(filterByStatus(subtasks(), "Done, Completed"), "Sub-task, Sub-story"))}

Number of times that a custom field has been changed

Jira expression

issue.changelogs .filter(changelog => changelog.items .some(item => item.fieldId == 'customfield_nnnnn')) .length

Number of work items with the same fix versions

General

%{%{issue.fixVersions} != null ? count(issuesFromJQL( "fixVersion in ('" + jiraExpression( "issue?.fixVersions?.map( v => v?.name).join(\"','\") ") + "') ")) : null}

Operations with field values from sub-tasks

Jira expression

issue.subtasks.length && issue.subtasks.map( s => (s.customfield_nnnnn || 0) * (s.customfield_ppppp || 0)) .reduce((a, b) => a + b)

Priority assessment based on field values

General

%{sum([%{issue.cfnnnnn} = "Option 1" ? 1 : 0, %{issue.cfppppp} = "Option 2" ? 1 : 0 ])}

Remaining budget - expenses tracked in subtasks

General

%{{issue.cfnnnnn} = null ? null : {issue.cfnnnnn} - sum( append(fieldValue({issue.cfppppp}, subtasks()), [0]))}

Sum of field values from subtasks

General

%{sum(fieldValue({issue.cfnnnn}, subtasks()))}

Sum of field values from work items in JQL query

General

%{sum(fieldValue({issue.cfnnnnn},issuesFromJQL("project = DEMO and 'fieldName' is not empty")))}

Sum of time spent of blocking work items

General

%{sum(append(fieldValue({issue.timeSpent},linkedIssues("is blocked by")), [0]))/60}

Sum of time spent of epic and work items under it

General

%{%{issue.issueType} = "Epic" ? (sum(append(fieldValue( {issue.timeSpent}, issuesUnderEpic()), [{issue.timeSpent}] )) / 60) : null}

Time left until due date

General

%{{issue.dueDate} != null ? max({issue.dueDate} - {system.currentDateTime}, 0) / DAY : null}

Time since creation

General

%{{system.currentDateTime} - {issue.created}}

Total original estimate of blocking work items

General

%{sum(append(fieldValue({issue.originalEstimate},linkedIssues( "is blocked by")),[0]))/60}

Total remaining estimate of blocking work items

General

%{sum(append(fieldValue({issue.remainingEstimate},linkedIssues( "is blocked by")),[0]))/60}