Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page

Table of Contents
maxLevel2
exclude(On this page|Use case).*
stylecircle
typeflat
separatorpipe



UI Text Box
sizemedium
typeinfo

Use case

This calculated field will display the difference between two dates reflected in Date picker fields in business days.


Prerequisites

UI Expand
titleSet up a calendar


UI Steps


UI Step
Add a new calendar in Jira administration > Manage apps > Calendars


UI Step

Name the calendar with a recognizable name as in the following example.

Code Block
languagebash
linenumberstrue
Business Hours



UI Step

Introduce a relevant expression in the Specification field like the following one:

Code Block
languagebash
linenumberstrue
MON-FRI{09:00-17:00;}






Configuration

UI Steps


UI Step

Create a new Calculated Text Field (by JWT) custom field and name it properly.

UI Text Box
typetip

Providing a description will help you to identify what the custom field does but this step is optional



UI Step

Parser expression

Add the following parser expression:

Code Block
languagebash
linenumberstrue
formatWorkDuration(timeDifference({issue.cfaaaaa},{issue.cfbbbbb},"Business Hours",LOCAL))


UI Text Box
typenote
Do not forget to replace {issue.cfaaaaa} and {issue.cfbbbbb} with the field codes of the appropriate custom fields.




UI Step

Add the field to the relevant view screens.

UI Text Box
typenote

Remember: All calculated fields are read-only and cannot be manually updated on a create or edit screen.










Related use cases

Page properties report
firstcolumnUse case
headingsField type, JWT feature, Workflow function, Parser functions, Label
sortByTitle
cqllabel = "calculated-field" and space = "JWTSDC" and ancestor = "27066671"


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue


JWT feature

Field typeText
Parser functionsformatWorkDuration() timeDifference()
Label




Page properties
hiddentrue



Status
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged