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
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
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:
ACTUALFINISH Variable is as shown below:
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
The automation script is created as shown below:
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.
UID
ibm11129167