Support Article
Incorrect value from OOTB pxSLAHistoryTimeliness function alias
Summary
When using the existing out-of-the-box pyAgeByFlowAssignment report definition as part of the implementation, the Past Goal function count is not included in the 'Total' column for all rows.
Query:
SELECT "PC0"."pytaskname" AS "pyTaskName" ,
SUM(CASE WHEN ( "PC0"."pxassignmentpastgoal" IS NULL OR "PC0"."pxassignmentpastgoal" = 0 ) THEN 1 ELSE 0 END) AS "pySummaryValue(1)" ,
SUM(CASE WHEN (( "PC0"."pxassignmentpastgoal" IS NOT NULL AND "PC0"."pxassignmentpastgoal" !=0 ) AND ("PC0"."pxassignmentpastdeadline" IS NULL OR "PC0"."pxassignmentpastdeadline" = 0 ) ) THEN 1 ELSE 0 END) AS "pySummaryValue(2)" ,
SUM(CASE WHEN ( "PC0"."pxassignmentpastdeadline" IS NOT NULL AND "PC0"."pxassignmentpastgoal" !=0) THEN 1 ELSE 0 END) AS "pySummaryValue(3)" ,
COUNT(*) AS "pySummaryCount(1)"
FROM pegadata.pc_History_CNO_FW_CWF_Work "PC0" WHERE ( "PC0"."pyhistorytype" = ? AND "PC0"."pyworkclass" LIKE ? ) AND "PC0"."pxobjclass" LIKE ? GROUP BY "PC0"."pytaskname" ORDER BY 5 DESC, 1 ASC
Error Messages
Not Applicable
Steps to Reproduce
- Navigate to the report definition.
- Search for the pyAgeByFlowAssignment report.
- Execute the report. Check the report details.
Root Cause
A defect in Pegasystems’ code or rules.
The pxSLAHistoryTimeliness function alias source had an error.
<%
String parameter1 = tools.getStepPage().getString(".pyParameters(1).pyParametersParamValue").replaceAII("\"","").replaceAJI("","");
%>
<p:choose>
<p:when java="<%= parameter1.equals("within goal") %>">
CASE WHEN ( {2} IS NULL OR {2} = 0 ) THEN 1 ELSE 0 END
</p:when>
<p:when java="<%= parameter1.equals("past goal") %>">
CASE WHEN (( {2} IS NOT NULL AND {2} !=0 ) AND ({3} IS NULL OR {3} = 0 ) ) THEN 1 ELSE 0 END </p:when>
<p:when java="<%= parameter1.equals("past deadline") %>">
CASE WHEN ( {3} IS NOT NULL AND {2} !=0) THEN 1 ELSE 0 END
</p:when>
<p:otherwise>
0
</p:otherwise>
</p:choose>
The below line in the code should be "{3} != 0".
CASE WHEN ( {3} IS NOT NULL AND {2} !=0) THEN 1 ELSE 0 END
Resolution
Apply HFix-57216.
Published October 16, 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.