IBM Support

Reset Actual Finish date when SR is reopened through Attribute Launch Point

Technical Blog Post


Abstract

Reset Actual Finish date when SR is reopened through Attribute Launch Point

Body

 

Problem Description

When ticket (like say SR) is resolved and then reopened by user, the Actual Finish date and time needs to be reset.

Example:

The Actual Finish attribute 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 a script with attribute launch point script to clear the field whenever the status it not RESOLVED or CLOSED (or any status that is synonym of this field).

Configuration Steps

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

The script is created with the following details:

Step 1:

Fill in the details with below values as shown in screen below:

  • Launch Point: REOPENSR
  • Description: Clear Actual Finish on Reopen SR
  • Object: SR
  • Attribute: STATUS
  • Event: Run Action
  • Script: New

image

 

 

 

Step 2

Fill in the details with below values as shown in screen below:

  • Script: REOPENSR
  • Description: Clear Actual Finish on Reopen SR
  • Log Level: ERROR
  • Script Language: python

image

Step 3

In the Variables section add 2 variables STATUS and ACTUALFINISH (which will be used in the script later) as shown in below screens

STATUS Variable is as shown below:

image

 

ACTUALFINISH Variable is as shown below:

image

Step 4

Use the variables created in earlier step and fill in the details of source code with below values as shown in screen below and click on Create:

  • Source Code

if STATUS not in ("RESOLVED", "CLOSED"):
 ACTFINISH = None

image

 

The automation script is created as shown below:

image

The above script is now associated to the STATUS field and whenever the status changes to anything other than RESOLVED or CLOSED, the ACTUALFINISH attribute is reset to null.

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11129167