You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

On this page

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

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

Set the Parsing Mode to Advanced

Parser expression

Add the following expression:

Text to be parsed for Calculated Text Field:
{issue.resolutionDate} != null ? ({issue.resolutionDate} <= {issue.dueDate} ? "Yes" : "No") : (datePart({system.currentDateTime}, LOCAL) > {issue.dueDate} ? "No" : null)

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:

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" }

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.

Check the results

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

SCREENSHOT


If you still have questions, feel free to refer to our support team.