Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADITO_Update_Upgrade
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
ADITO_Update_Upgrade
Commits
51e95378
Commit
51e95378
authored
5 years ago
by
Heinz Boesl
Browse files
Options
Downloads
Patches
Plain Diff
changes DuplicatesScanner
parent
eb249907
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
neonView/DuplicateScannerFilter_view/DuplicateScannerFilter_view.aod
+1
-1
1 addition, 1 deletion
...plicateScannerFilter_view/DuplicateScannerFilter_view.aod
process/DuplicateScanner_lib/process.js
+7
-18
7 additions, 18 deletions
process/DuplicateScanner_lib/process.js
with
8 additions
and
19 deletions
neonView/DuplicateScannerFilter_view/DuplicateScannerFilter_view.aod
+
1
−
1
View file @
51e95378
...
...
@@ -15,7 +15,7 @@
<entityField>
#ENTITY
</entityField>
<isCreatable
v=
"false"
/>
<isDeletable
v=
"false"
/>
<isEditable
v=
"
fals
e"
/>
<isEditable
v=
"
tru
e"
/>
<columns>
<neonTableColumn>
<name>
7508e984-6a0b-4ec6-ab49-452e2b54f76d
</name>
...
...
This diff is collapsed.
Click to expand it.
process/DuplicateScanner_lib/process.js
+
7
−
18
View file @
51e95378
...
...
@@ -361,7 +361,7 @@ DuplicateScannerUtils.ScanRecords = function(pTargetEntity, pTargetRecordsData,
}
let
foundDuplicates
=
_DuplicateScannerUtils
.
_scanForDuplicates
(
pTargetEntity
,
entityFieldValuesRay
,
pResultFields
,
pEntityIdField
,
idValue
,
pFormatValuesConsumeWebserviceCallback
,
pUseExternalWebservice
,
pIndexPattern
)
entityFieldValuesRay
,
pResultFields
,
idValue
,
pFormatValuesConsumeWebserviceCallback
,
pUseExternalWebservice
,
pIndexPattern
)
if
(
foundDuplicates
==
null
||
foundDuplicates
.
length
==
0
)
{
...
...
@@ -584,7 +584,7 @@ DuplicateScannerUtils.ScanForDuplicates = function(pFilterName, pTargetEntity, p
let
idValue
=
pValuesToCheck
[
entityIdField
];
return
_DuplicateScannerUtils
.
_scanForDuplicates
(
pTargetEntity
,
entityFieldConfigValuesRay
,
resultFields
,
entityIdField
,
idValue
,
entityFieldConfigValuesRay
,
resultFields
,
idValue
,
pFormatValuesConsumeWebserviceCallback
,
useExternalWebservice
,
indexPattern
)
}
...
...
@@ -897,14 +897,14 @@ _DuplicateScannerUtils._loadEntityIdField = function(pFilterName, pTargetEntity)
* @see DuplicateScannerUtils.ScanForDuplicates for the documentation
*/
_DuplicateScannerUtils
.
_scanForDuplicates
=
function
(
pTargetEntity
,
pEntityFieldConfigValuesRay
,
pResultFields
,
pRecordIdFieldToIgnore
,
pRecordIdValueToIgnore
,
pFormatValuesConsumeWebserviceCallback
,
pUseExternalWebservice
,
pIndexPattern
)
pResultFields
,
pRecordIdValueToIgnore
,
pFormatValuesConsumeWebserviceCallback
,
pUseExternalWebservice
,
pIndexPattern
)
{
//No filterfields/indexpattern => No indexsearch
if
(
pEntityFieldConfigValuesRay
.
length
<
1
||
pIndexPattern
==
null
||
pIndexPattern
==
""
)
return
null
;
let
possibleDuplicates
=
[];
let
ignoreSourceRecordPattern
=
_DuplicateScannerUtils
.
_getIgnoreSourceRecordPattern
(
pRecordIdFieldToIgnore
,
pRecordIdValueToIgnore
);
let
ignoreSourceRecordPattern
=
_DuplicateScannerUtils
.
_getIgnoreSourceRecordPattern
(
pRecordIdValueToIgnore
);
let
indexPatternWithValues
=
_DuplicateScannerUtils
.
_replacePlaceholderForValuesInPattern
(
pIndexPattern
,
pEntityFieldConfigValuesRay
);
indexPatternWithValues
=
ignoreSourceRecordPattern
+
indexPatternWithValues
+
"
)
"
;
...
...
@@ -990,10 +990,6 @@ _DuplicateScannerUtils._setResultFields = function(pIndexQuery, pResultFields)
resultFields
.
push
(
pResultFields
[
i
]);
}
// if(resultIndexFields.length == 0 && resultFields.length == 0)
// pIndexQuery = pIndexQuery.addResultIndexFields([indexsearch.FIELD_ID]);
// else
// {
if
(
resultIndexFields
.
length
>
0
)
pIndexQuery
=
pIndexQuery
.
addResultIndexFields
(
resultIndexFields
);
...
...
@@ -1001,8 +997,6 @@ _DuplicateScannerUtils._setResultFields = function(pIndexQuery, pResultFields)
{
pIndexQuery
=
pIndexQuery
.
addResultFields
(
resultFields
);
}
// }
return
pIndexQuery
;
}
...
...
@@ -1077,10 +1071,6 @@ _DuplicateScannerUtils._buildUpdateAttachParticipantsToNewContactQuery = functio
_DuplicateScannerUtils
.
_buildDeleteRemoveObsoleteParticipantsRecordsQuery
=
function
(
pTableName
,
pContactIdColumn
,
pAssignableIdColumn
,
pSourceContactId
,
pTargetContactId
,
updateStatements
)
{
//DELETE FROM CAMPAIGNPARTICIPANT
// WHERE ( CAMPAIGN_ID in (select ab.CAMPAIGN_ID from (select CAMPAIGN_ID, CONTACT_ID from CAMPAIGNPARTICIPANT) ab where ab.CONTACT_ID = '64a51ec3-e75d-4415-8aa2-a00a1e9be0b0') and CAMPAIGN_ID = '51960918-3b24-4bac-8f1c-3892bf210f6d')
var
selectAssignableIdsOfTargetContactQuery
=
newSelect
(
pAssignableIdColumn
)
.
from
(
pTableName
)
.
where
([
pTableName
,
pContactIdColumn
],
pTargetContactId
);
...
...
@@ -1103,7 +1093,7 @@ _DuplicateScannerUtils._buildDeletePersonAndContactQuery = function(pSourcePerso
{
let
recordsToDelete
=
[]
recordsToDelete
.
push
([
"
PERSON
"
,
newWhere
(
"
PERSON.PERSONID
"
,
pSourcePersonId
).
build
()]);
recordsToDelete
.
push
([
"
CONTACT
"
,
newWhere
(
"
CONTACT.CONTACTID
"
,
pSource
Person
Id
).
build
()]);
recordsToDelete
.
push
([
"
CONTACT
"
,
newWhere
(
"
CONTACT.CONTACTID
"
,
pSource
Contact
Id
).
build
()]);
return
recordsToDelete
;
}
...
...
@@ -1126,13 +1116,12 @@ _DuplicateScannerUtils._buildDeleteCachedUnrelatedDuplicateQuery = function(pSou
/*
* Creates a pattern which excludes the field and it's value
*
* @param {String} pRecordIdFieldToIgnore Field to be ignored
* @param {String} pRecordIdValueToIgnore The fields value
* @returns {String} Pattern which excludes the gived field in combination with the value
*/
_DuplicateScannerUtils
.
_getIgnoreSourceRecordPattern
=
function
(
pRecordIdFieldToIgnore
,
pRecordIdValueToIgnore
)
_DuplicateScannerUtils
.
_getIgnoreSourceRecordPattern
=
function
(
pRecordIdValueToIgnore
)
{
return
"
( +( -
"
+
pRecordIdFieldToIgnore
.
toLowerCase
()
+
"
_value
:(
"
+
pRecordIdValueToIgnore
+
"
) )
"
;
return
"
( +( -
"
+
indexsearch
.
FIELD_ID
+
"
:(
"
+
pRecordIdValueToIgnore
+
"
) )
"
;
}
_DuplicateScannerUtils
.
_buildUpdateContactIdStatements
=
function
(
pTableInfos
,
pSourceContactId
,
pTargetContactId
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment