Skip to content
Snippets Groups Projects
Commit d1a86a37 authored by Sascha Schmidt's avatar Sascha Schmidt Committed by Johannes Goderbauer
Browse files

fix #1045265 campaign: update steps action only updated person-contacts but...

fix #1045265 campaign: update steps action only updated person-contacts but not organisation-contacts
parent 4dc93a40
No related branches found
No related tags found
No related merge requests found
......@@ -357,13 +357,13 @@ CampaignUtils.GetContactIdsNotInCampaignByCondition = function(pCampaignId, pCon
CampaignUtils.GetContactIdsInCampaignByCondition = function(pCampaignId, pCondition, pRightJoinContacts)
{
let query = "select CONTACT.CONTACTID from PERSON"
let query = "select CONTACT.CONTACTID from CONTACT"
if(pRightJoinContacts == "true")
query += " right"
// if(pRightJoinContacts == "true")
// query += " right"
query += " join CONTACT on (CONTACT.PERSON_ID = PERSON.PERSONID)"
+ " join ORGANISATION on (ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID)"
query += " left join PERSON on (CONTACT.PERSON_ID = PERSON.PERSONID)"
+ " left join ORGANISATION on (ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID)"
+ " left join ADDRESS on (ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID)"
+ " left join CAMPAIGNPARTICIPANT on CAMPAIGNPARTICIPANT.CONTACT_ID = CONTACT.CONTACTID"
+ " where " + pCondition
......
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