Dev Studio search updated
Hi All,
As per 8.8.2 Resolved Issues for Reporting there is this section
INC-242955 757160 Dev Studio search updated Search in Dev Studio was not working as expected after update. To resolve this, search has been updated to accept a regex expression containing two hyphens for work ID pattern check. Reporting
However this still doesn't work. We are running 8.8.2 and I can see in activity pzSearchResults which has been updated in Pega-Desktop:08-08-03 step 11 shows the following REGEX.
workIdFormat=tools.getParamValue("searchText").matches("(\\p{L}-)?[\\p{L}0-9][\\p{L}0-9]*-[0-9]+");
This regex does not work correctly.
Take this caseid as an example LP-160424-4 it doesn't match. Have checked this with https://regex101.com/ it only matches upto the second hyphen and so returns no results.
Years a ago in version 7.31 we got a hotfix for this exact issue in version Pega-Desktop:07-10-34 from version 07-10-33 which contained the following code.
Hi All,
As per 8.8.2 Resolved Issues for Reporting there is this section
INC-242955 757160 Dev Studio search updated Search in Dev Studio was not working as expected after update. To resolve this, search has been updated to accept a regex expression containing two hyphens for work ID pattern check. Reporting
However this still doesn't work. We are running 8.8.2 and I can see in activity pzSearchResults which has been updated in Pega-Desktop:08-08-03 step 11 shows the following REGEX.
workIdFormat=tools.getParamValue("searchText").matches("(\\p{L}-)?[\\p{L}0-9][\\p{L}0-9]*-[0-9]+");
This regex does not work correctly.
Take this caseid as an example LP-160424-4 it doesn't match. Have checked this with https://regex101.com/ it only matches upto the second hyphen and so returns no results.
Years a ago in version 7.31 we got a hotfix for this exact issue in version Pega-Desktop:07-10-34 from version 07-10-33 which contained the following code.
String defaultREGEX="[\\p{L}0-9][\\p{L}0-9]*-[0-9]+";
java.util.regex.Pattern compiledPattern;
workIdREGEX = tools.getSystemSettings().getDynamic("Pega-RULES", "WorkIdREGEX");
if ( (workIdREGEX == null) || (workIdREGEX.length()==0) ) { workIdREGEX = defaultREGEX; }
try {
compiledPattern=java.util.regex.Pattern.compile( workIdREGEX );
}
catch(java.util.regex.PatternSyntaxException e) {
oLog.error("Bad REGEX provided in DSS 'Pega-RULES','workIdREGEX', using default REGEX");
workIdREGEX = defaultREGEX;
compiledPattern=java.util.regex.Pattern.compile( defaultREGEX );
}
java.util.regex.Matcher m=compiledPattern.matcher( tools.getParamValue("searchText") );
workIdFormat=m.matches();
And a DSS recommendation containing this regex
[\w-]+-\d+(-[\d]+)*
Which worked. I can see going back that in version 08-01-01 this code was reverted back and remains similar albeit with a little tweak but still doesn't work.
Why was this hotfix removed and reverted back?
Cheers Craig