Use case
This calculated field will display the difference between two dates reflected in Date picker fields in business days.
🗒️ Prerequisites
Set up a calendar
Add a new calendar in Jira administration > Manage apps > Calendars
Name the calendar with a recognizable name as in the following example.
Business Hours
Introduce a relevant expression in the Specification field like the following one:
MON-FRI{09:00-17:00;}
⚒️ Configuration
Create a new Calculated Text Field (by JWT) custom field and name it properly.
Providing a description will help you to identify what the custom field does but this step is optional
Parser expression
Add the following parser expression:
formatWorkDuration(timeDifference({issue.cfaaaaa},{issue.cfbbbbb},"Business Hours",LOCAL))
Do not forget to replace
{issue.cfaaaaa} and {issue.cfbbbbb} with the field codes of the appropriate custom fields.
Add the field to the relevant view screens.
Remember: All calculated fields are read-only and cannot be manually updated on a create or edit screen.
📚 Related use cases
| Title | Field type | JWT feature | Label |
|---|---|---|---|
| Check if an issue was resolved on time | Text |
(input latin letters) |
|
| Components from all sub-tasks |
(input latin letters) |
|
|
| Details of the last comment | Text |
(input latin letters) |
STAFF PICK |
| Difference between two dates in business days | Text |
(input latin letters) |
|
| Display additional details of the issue creator |
(input latin letters) |
|
|
| Display current issue's project category |
(input latin letters) |
|
|
| Display historic due dates |
(input latin letters) |
|
|
| Display reporters of linked Cloud issues | Text |
(input latin letters) |
|
| Google Maps location | Text |
(input latin letters) |
STAFF PICK |
| Highest ranked custom field value among all linked issues | Text |
(input latin letters) |
|
| Last comment, its author, and timestamp | Text |
(input latin letters) |
STAFF PICK |
| Last commenter's full name | Text |
(input latin letters) |
|
| Status and assignee of parent issue |
(input latin letters) |
|