There is an Inconsistency of stage in list view for Catalog Task execution for Main Flow and Sub Flows with "Workflow-Driven" stage renderer.
Build name: Jakarta
Build date: 12-22-2017_1615
Build tag: glide-jakarta-05-03-2017__patch7-12-13-2017
gr.getDisplayValue('stage') on a Requested Item record will show the stage of a sub workflow instead of the main workflow (mainflow).
gr.getDisplayValue('stage') is used in Service Portal to display the stage of RITM records.
Multiple widgets (Simple List, Ticket Fields etc) are using this API to display the stage.
Steps to Reproduce
- Navigate to Service Catalog > Maintain Items
- Click on Standard Laptop
- Click Try It
- Click Order Now
- Navigate to the Request generated
- Navigate to the sysapproval_approver related list and right click the "Approvers" and select "Approve"
- Navigate to the RITM and follow the same step on step 7 until the Catalog Task is generated.
(Take a note of the sys_id of the RITM record)
- Navigate to the Catalog task created, set it to "Closed Complete"
- Then the main workflow proceeds to the "Catalog Task" activity and creates the second Catalog Task.
- The Stage for the main workflow is "Deployment".
- The Stage for the sub workflow is "Fulfillment".
- Run the following script on "Scripts - background" page.
var gr = new GlideRecord('sc_req_item');
gr.get('<sys_id>'); // Replace the sys_id in step 8.
Result: (RITM number may vary)
*** Script: RITM0010004
*** Script: Deployment
*** Script: Fulfillment
- (Optional) Open the following OOTB SP page, notice the stage in the list and form are different for the same RITM record.
This issue is under review. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.
Related Problem: PRB1249919