Support Article
View Full History of SMS Treatments do not work
Summary
When a user wants to see SMS treatment history the history provided by Pega Marketing is not reflecting actual changes that were applied in each revision and compare differences functionality does not show expected differences.
Following are the environment details :
Pega Marketing 7.13 on top of Pega 7.1.9
Error Messages
No error message.
Steps to Reproduce
1.Create new SMS treatment rule, enter in the message Test 1, save and check in changed.
2.Checkout SMS treatment rule created in #1, enter in the message Test 2, save and check in changes with comment Test 2.
3.Checkout SMS treatment rule created in #1, enter in the message Test 3, save and check in changes with comment Test 3.
4.Checkout SMS treatment rule created in #1, enter in the message Test 4, save and check in changes with comment Test 4.
5.Checkout SMS treatment rule created in #1, enter in the message Test 5, save and check in changes with comment Test 5.
6. Go to History tab and click the View Full History button.
7. Compare differences between first two entries on the list - Initial creation and Test 2.
8. Compare differences between second and third entry on the list - Test 2 and Test 3.
9. Compare differences between two the most recent entries on the list - Test 4 and Test 5.
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
It will be fixed in future version.
If only the developer wants to compare the rules the following local change can be applied:
Private check-out the Out-of-the-box (OOTB) Html fragment pzRuleDiffHistoryScripts and replace the CompareRules() function with the below code :
function CompareRules()
{
var theUrl = new SafeURL("PegaAccel-Management-Refactor-RuleSet.pyLaunchDiff")
var checkboxes = pega.util.Dom.getElementsByName("historykey",document);
var selected = 0;
var addparam = 1;
debugger;
for (var i = 0;i < checkboxes.length ; i++)
{
if (checkboxes[i].checked)
{
var keyVal;
if(i == 0) {
keyVal = checkboxes[i].value;
// The key index is from ' ' upto '!'
var keyValRule = keyVal.substring(keyVal.indexOf(' '),keyVal.lastIndexOf('!'));
keyVal = keyValRule;
}else {
keyVal = checkboxes[i-1].value
}
if (addparam == 1)
{
theUrl.put("FirstRuleKey",keyVal);
}
else if (addparam == 2)
{
theUrl.put("SecondRuleKey",keyVal);
}
addparam++;
}
}
openUrlInWindow(theUrl,'rulediff',"toolbar=no,scrollbars=yes,width=1000,height=650 top=100 left=100 resizable=1");
}
Published May 14, 2016 - 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.