Support Article
pxSLAAssignTimeliness OOTB function displays incorrect data
SA-69771
Summary
When running the pyAgeByAssignee out-of-the-box report definition, the count displays the same value for both Within Goal and the Past Goal columns.
Error Messages
Not Applicable
Steps to Reproduce
Run the pyAgeByAssignee report definition that uses the out-of-the-box pxSLAAssignTimeliness function.
Root Cause
A defect in Pegasystems’ code or rules.
The issue occurs because the pxSLAAssignTimeliness out-of-the-box function displays 0 instead of NULL for cases when the conditions, Within goal, Past goal, and Past deadline are not satisfied. Therefore, the records with value 0 also display in the report definition when Count is used and display in the drill down report when Sum is used.
Resolution
Perform the following local-change:
Create a custom function alias with the following code: <%
String parameter1 = tools.getStepPage().getString(".pyParameters(1).pyParametersParamValue").replaceAll("\"","").replaceAll("'","");
%>
<p:choose>
<p:when java="<%= parameter1.equals("within goal") %>">
CASE WHEN {2} IS NULL THEN 1 ELSE NULL END
</p:when>
<p:when java="<%= parameter1.equals("past goal") %>">
CASE WHEN (({2} IS NOT NULL) AND ({3} IS NULL)) THEN 1 ELSE NULL END
</p:when>
<p:when java="<%= parameter1.equals("past deadline") %>">
CASE WHEN (({2} IS NOT NULL) AND ({3} IS NOT NULL))THEN 1 ELSE NULL END
</p:when>
<p:otherwise>
0
</p:otherwise>
</p:choose>
Published January 6, 2019 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.