IBM Support

Clear Actual Finish when SR is reopened through escalation or Workflow

Technical Blog Post


Abstract

Clear Actual Finish when SR is reopened through escalation or Workflow

Body

 

Problem Description

When ticket (like say SR) is resolved, the Actual Finish date and time is populated automatically. However, if the end user is not happy about the solution and reopens the SR (i.e. change the status to say In Progress again), the Actual Finish date and time remains the same as earlier value. Requirement is that the field should be reset to null again so that the latest Actual Finish date is recorded.

 

Example:

Take the example of the Actual Finish field below:

image

 

 

 

 

 

 

 

 

 

 

The value in the field is populated when the ticket is RESOLVED. However, when the end user is not happy with the solution and reopens the ticket, this field needs to be reset.

 

Solution

Associate an action script to an escalation or workflow through which the status change is done.

 

Configuration Steps

In 'System Configuration -> Platform Configuration-> Automation Scripts', click on action Create -> Script with Action Launch Point from ‘More Actions’.

The script is created with the following details:

Step 1:

  • Launch Point: REOPEN
  • Description: Clear Actual Finish on Reopen
  • Object: SR
  • Action:REOPEN
  • Description: Clear Actual Finish on Reopen

The values populated is as shown in the screen grab below:

image

 

Step 2:

  • Script: REOPEN
  • Description: Clear Actual Finish on Reopen
  • Log Level: ERROR
  • Script Language: JavaScript

The values populated is as shown in the screen grab below:

image

 

Step 3

  • Source Code

importPackage(Packages.psdi.mbo);

importPackage(Packages.psdi.server);

srSet=mbo.getMboSet("SR");

srMbo=srSet.getMbo(0);

srMbo.setValueNull("ACTUALFINISH",MboConstants.NOVALIDATION_AND_NOACTION+MboConstants.NOACCESSCHECK);

mbo.getThisMboSet().save();

The values populated is as shown in the screen grab below:

image

 

 

The automation script is created as shown below:

 

image

 

The above script can now be associated to an escalation or a workflow to be triggered when sttaus changes to In Progress

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11129173