Support Article
Work Status flag does not display when using localized ruleset
SA-45586
Summary
Work status flags do not display in the pyWorkAssignmentStatus control when using language packs.
Error Messages
Not Applicable
Steps to Reproduce
- Install the Dutch language pack.
- Change the operator locale from en_EN to nl_NL. The Flag beside the status disappears.
Root Cause
A defect in Pegasystems’ code.
In the pyWorkAssignmentStatus control, the localised value of pyStstusLabel was checked and the flag appeared when the localized value was New, Open, Pending, or Resolved. The flag disappeared because 'Pending' was translated to 'in afwachting' (Dutch).
Resolution
Perform the following local-change:
Replace the pyAssignmentStatus control code to:
<%
ClipboardProperty presentProp = tools.getActive();
String Status = "";
String StatusActual = "";
if (presentProp != null) {
oLog.infoForced("1");
ClipboardPage primaryPage = presentProp.getParentPage();
String className = primaryPage.getString(".pxObjClass");
if (className.startsWith("Assign-") || className.startsWith("History-")) {
Status = tools.getLocalizedTextForString("pyStatusLabel",primaryPage.getString("pyAssignmentStatus"));
StatusActual = primaryPage.getProperty("pyAssignmentStatus").toString();
} else {
Status = tools.getLocalizedTextForString("pyStatusLabel",presentProp.getStringValue());
StatusActual=presentProp.getStringValue();
}
tools.getStepPage().putString("pyTransientAssignmentStatus",tools.getLocalizedTextForString("pyStatusLabel",Status));
}
%>
<div style="white-space:nowrap">
<span>
<pega:when test='param.IncludeStatusIcon != "false"'>
<pega:choose>
<pega:when test='isAccessible'>
</pega:when>
<pega:when java='<%=StatusActual.startsWith("Open")%>'>
<img style="vertical-align: middle;" src="images/pystatusBlueFlag.gif">
</pega:when>
<pega:when java='<%=StatusActual.toUpperCase().indexOf("RESOLVED") >= 0%>'>
<img style="vertical-align: middle;" src="images/pystatusCheckeredFlag.gif">
</pega:when>
<pega:when java='<%=StatusActual.equals("New")%>'>
<img style="vertical-align: middle;" src="images/pystatusGreenFlag.gif">
</pega:when>
<pega:when java='<%=StatusActual.equals("Completed")%>'>
<img style="vertical-align: middle;" src="images/pystatusCheckeredFlag.gif">
</pega:when>
<pega:when java='<%=StatusActual.toUpperCase().indexOf("PENDING") >= 0%>'>
<img style="vertical-align: middle;" src="images/pystatusRedFlag.gif">
</pega:when>
<pega:otherwise>
</pega:otherwise>
</pega:choose>
</span>
</pega:when>
<pega:when test='param.IncludeStatusText != "false"'>
<a href= "#"class="ellipsis" style="width:100%;color:black;text-decoration:none" >
<pega:when java='<%=!Status.equals("")%>'>
<%=Status%>
</pega:when>
</a>
</pega:when>
</div>
Separate the source property of the flag (image) and the Status value.
The clipboard value of pyStatusLabel (introduced var StatusActual) sources the Flag and the localized value of that property is the Status.
Published December 9, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.