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
colourGreenYellow
titleReady for reviewdone

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

Page properties
hiddentrue
Field typeJWT 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
Parser expression



stepsui-
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
{
10423
issue.resolutionDate} != null AND {issue.dueDate} != null						#Only calculate a value if both dates are set
? ({
10423
issue.resolutionDate} <= {
10424
issue.dueDate} ? "Yes" : "No") 					#Check whether the resolution date was before the due date
: (datePart({
000057
system.currentDateTime}, LOCAL) > {
10424
issue.dueDate} ? "No" : null)	#Check whether the unresolved issue is overdue


ui-expand
titlemore info...


UI Text Box
typeinfo

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

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

To achieve this, the following functions are used:

  • {10423} is the field code for custom date picker "Date closed" (this field code might differ on your Jira instance)
  • {10424} is the field code for custom date picker "Expected Due Date" (this field code might differ on your Jira instance




    UI Step
    Set

    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.

    Calculated Text Field to two additional date picker custom fields:
  • Date Picker custom field "Date closed"
  • Date Picker custom field "Expected Due Date"



    Set the display value with the following conditions:

    if (Date closed = null && Current Day <= Expected Due Date) { "" } if (Date closed <= Expected Due Date) { "Yes" } if (Date closed > Expected Due Date || (Date closed = null && Current Day > Expected Due Date)) { "No" }
    UI Step
    Code Block
    languagebash
    linenumberstrue

    Check the results

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

    Image Added

    Image Added



    Image AddedRelated use cases

    Page properties report
    headingsField type, JWT 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