Skip to content
Snippets Groups Projects
Commit 15494d2f authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

DuplicateScanner fix for excluded words

parent 2f54ca28
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@
<column name="FILTER_NAME" value="OrganisationDuplicates" />
<column name="EXTERNAL_SERVICE_USAGE_ALLOWED" valueNumeric="0" />
<column name="ID_FIELD_NAME" value="CONTACTID" />
<column name="SCAN_PATTERN" value="{&quot;entity&quot;:&quot;Organisation_entity&quot;,&quot;provider&quot;:&quot;indexP&quot;,&quot;filter&quot;:{&quot;type&quot;:&quot;group&quot;,&quot;operator&quot;:&quot;AND&quot;,&quot;childs&quot;:[{&quot;type&quot;:&quot;row&quot;,&quot;name&quot;:&quot;NAME&quot;,&quot;operator&quot;:&quot;CONTAINSNOT&quot;,&quot;value&quot;:&quot;[\&quot;gmbh\&quot;, \&quot;co\&quot;, \&quot;kg\&quot;, \&quot;ag\&quot;, \&quot;bank\&quot;, \&quot;deutsche\&quot;, \&quot;van\&quot;, \&quot;software\&quot;, \&quot;medien\&quot;, \&quot;print\&quot;]&quot;,&quot;key&quot;:&quot;[\&quot;gmbh\&quot;, \&quot;co\&quot;, \&quot;kg\&quot;, \&quot;ag\&quot;, \&quot;bank\&quot;, \&quot;deutsche\&quot;, \&quot;van\&quot;, \&quot;software\&quot;, \&quot;medien\&quot;, \&quot;print\&quot;]&quot;,&quot;contenttype&quot;:&quot;LONG_TEXT&quot;},{&quot;type&quot;:&quot;row&quot;,&quot;name&quot;:&quot;STANDARD_CITY&quot;,&quot;operator&quot;:&quot;ISNOTNULL&quot;,&quot;value&quot;:&quot;&quot;,&quot;key&quot;:&quot;&quot;,&quot;contenttype&quot;:&quot;TEXT&quot;}]}}" />
<column name="SCAN_PATTERN" value="{&quot;entity&quot;:&quot;Organisation_entity&quot;,&quot;provider&quot;:&quot;indexP&quot;,&quot;filter&quot;:{&quot;type&quot;:&quot;group&quot;,&quot;operator&quot;:&quot;AND&quot;,&quot;childs&quot;:[{&quot;type&quot;:&quot;row&quot;,&quot;name&quot;:&quot;NAME&quot;,&quot;operator&quot;:&quot;CONTAINSNOT&quot;,&quot;value&quot;:&quot;[\&quot;gmbh\&quot;, \&quot;co\&quot;, \&quot;kg\&quot;, \&quot;ag\&quot;, \&quot;se\&quot;, \&quot;bank\&quot;, \&quot;deutsche\&quot;, \&quot;van\&quot;, \&quot;software\&quot;, \&quot;medien\&quot;, \&quot;print\&quot;]&quot;,&quot;key&quot;:&quot;[\&quot;gmbh\&quot;, \&quot;co\&quot;, \&quot;kg\&quot;, \&quot;ag\&quot;, \&quot;bank\&quot;, \&quot;deutsche\&quot;, \&quot;van\&quot;, \&quot;software\&quot;, \&quot;medien\&quot;, \&quot;print\&quot;]&quot;,&quot;contenttype&quot;:&quot;LONG_TEXT&quot;},{&quot;type&quot;:&quot;row&quot;,&quot;name&quot;:&quot;STANDARD_CITY&quot;,&quot;operator&quot;:&quot;ISNOTNULL&quot;,&quot;value&quot;:&quot;&quot;,&quot;key&quot;:&quot;&quot;,&quot;contenttype&quot;:&quot;TEXT&quot;}]}}" />
<column name="USER_NEW" value="Admin" />
<column name="DATE_NEW" valueDate="2020-06-26T00:00:00" />
<column name="USER_EDIT" value="Admin" />
......
......@@ -18,6 +18,7 @@ var contactId = entityData["param.ContactId_param"];
var reportType = entityData["param.ReportType_param"];
if (reportType)
{
DataPrivacyUtils.openReport(contactId, reportType, params);
result.string(true);
\ No newline at end of file
result.string(true);
}
......@@ -731,13 +731,13 @@ DuplicateScannerUtils.buildEntityFieldConfigs = function(pDuplicateFieldsConfig,
entityFieldValue = entityFieldValue.toLowerCase().replace(/[():\.\/!]/gi, "").trim();
let exclude = fieldConfig.exclude;
if ( exclude )
if (exclude)
{
for(let i = 0; i < exclude.length; i++)
{
exclude.forEach(function (excludeValue)
{
entityFieldValue = " " + entityFieldValue + " ";
entityFieldValue = entityFieldValue.replace(new RegExp( " " + exclude[i] + " ", "gi"), "");
}
entityFieldValue = entityFieldValue.replace(new RegExp( " " + excludeValue + " ", "gi"), "");
});
}
let valuelength = fieldConfig.length;
......@@ -893,9 +893,10 @@ _DuplicateScannerUtils._filterChildsRowToScanPattern = function (name, operator,
let row = "";
row = row + name.toLowerCase() + ':({"entityfield":"' + name + '"';
switch (operator){
case 'NOT_EQUAL':
row = row + ', "exclude":' + JSON.parse(value);
case 'ISNOTNULL':
case "NOT_EQUAL":
case "CONTAINSNOT":
row = row + ', "exclude":' + value;
case "ISNOTNULL":
row = row + ', "empty":' + false;
}
row = row + '})';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment