Versions Compared

Key

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


(On this page|Use case).*

Page properties
hiddentrue


Tech review

Status
colourYellowGreen
titleReady for reviewdone

Style guide

Status
colourGreen
titledone

Page status

Status
colourYellowGreen
titleReady for reviewdone

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

Page properties
hiddentrue
Field type JWT calculated text fields
Use case descriptionChecks whether issues were resolved before the due date.
Complexity
Status
colourYellow
titleintermediate
Panel

On this page

Table of Contents
exclude

stylecircletypeflatseparatorpipe



UI Text Box
sizemedium
typeinfo

Use case

This calculated field returns Yes, if the current issue was resolved before the expected due date, and No if the issue was resolved too late or is currently overdue


Image AddedConfiguration

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

Set the Parsing Mode to Advanced text


UI Step

Parser expression

Add the following expression:

Code Block
languagebash
titleText to be parsed for Calculated Text Field:
linenumberstrue
{issue.resolutionDate} != null AND {issue.dueDate} != null						#Only calculate a value if both dates are set
? ({issue.resolutionDate} <= {issue.dueDate} ? "Yes" : "No") 					#Check whether the resolution date was before the due date
: (datePart({system.currentDateTime}, LOCAL) > {issue.dueDate} ? "No" : null)	#Check whether the unresolved issue is overdue


ui-expand
titlemore info...


if (Resolved date = null && Current Day <= Expected Due Date) { "" } if (Resolved date <= Expected Due Date) { "Yes" } if (Resolved date > Expected Due Date || (Resolved date = null && Current Day > Expected Due Date)) { "No" }

Yes will only be returned if the issue was resolved before the due date.

To achieve this, the following functions are used:

UI Text Box
typeinfo

This expression will only return No if the issue was either resolved too late or is unresolved and overdue. 

Code Block
languagebash
titleHow to read the expression
linenumberstrue




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.



UI Step

Check the results

Once configured and added to an issue screen, the result will look like this:

Image Added

SCREENSHOT Image Added



Image ModifiedRelated use cases

Use case
Page properties report
firstcolumn
headingsField type, Use case description, ComplexityJWT feature, 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

Image Added

Field typeText
Parser functionsdatePart()
Label