Smart Fields Examples

 

Total time passed in hours since the issue has been resolved

1- Login to JIRA as an administrator.

2- Go to Settings → Issues → Custom Fields.

3- Create a custom field with Smart Number Field type. Don’t forget to add it to related screens.

4- Locate the custom field you created in the custom fields list.

5- From the actions, choose “Contexts and default value”.

6- Click on “Edit custom field config”.

7- Enter the expression below to “Insert Jira Expression” editor.

8- Save your configuration.

issue.resolutionDate ? (new Date()).minusMinutes(issue.resolutionDate.getTime() / (1000 * 60)) .getTime() / (1000 * 60 * 60) : null

The final date to start working on an issue to finish on due date

1- Login to JIRA as an administrator.

2- Go to Settings → Issues → Custom Fields.

3- Create a custom field with Smart Text Field type. Don’t forget to add it to related screens.

4- Locate the custom field you created in the custom fields list.

5- From the actions, choose “Contexts and default value”.

6- Click on “Edit custom field config”.

7- Enter the expression below to “Insert Jira Expression” editor.

8- Save your configuration.

issue?.dueDate && issue.originalEstimate ? issue?.dueDate.minusDays(issue.originalEstimate / (60 * 60 * 8)).toISOString() : ""

Account Id of Previous Assignee

1- Login to JIRA as an administrator.

2- Go to Settings → Issues → Custom Fields.

3- Create a custom field with Smart Text Field type. Don’t forget to add it to related screens.

4- Locate the custom field you created in the custom fields list.

5- From the actions, choose “Contexts and default value”.

6- Click on “Edit custom field config”.

7- Enter the expression below to “Insert Jira Expression” editor.

8- Save your configuration.

issue.changelogs.map(e => e.items).flatten() .filter(e => e.field == "assignee").length > 1 ? issue.changelogs.map(e => e.items).flatten() .filter(e => e.field == "assignee")[issue.changelogs.map(e => e.items).flatten().filter(e => e.field == "assignee").length - 2].from : ""

Previous Status

Blocking Issues

Total Worklogs by Author

Parent Priority

Parent Assignee

Parent Status

Comment Authors

Last Status Author

Project Category

Project Lead

Assignees of Sub-tasks

ICE Score

Replace IIIII, CCCCC and EEEEE with your following number custom fields:

IIIII → Impact

CCCCC → Confidence

EEEEE → Ease

Time Spent - Original Estimate Ratio