Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Incorrect value from OOTB pxSLAHistoryTimeliness function alias

SA-90783

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

  1. Navigate to the report definition.
  2. Search for the pyAgeByFlowAssignment report.
  3. 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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us