eileenmcnaughton / nz.co.fuzion.civixero

Synchronisation between CiviCRM & Xero
7 stars 14 forks source link

Don't sync contacts marked do not sync #161

Closed stesi561 closed 1 month ago

stesi561 commented 1 month ago

Change by @jitendrapurohit

This adds an additional condition to building the list of contacts to sync.

Currently if a Contact is deleted we hit -> https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/blob/2028010f7097ca20e8370884eca6eda3da5fdff6/CRM/Civixero/Contact.php#L182

Which sets do not sync - However - we don't add this to our query to build a list of contacts in getContactsRequiringPushUpdate - in which we set a limit.

So as soon as we have more deleted contacts than the limit we have problems! As in the process to push the contacts in we set this field then move on without doing anything.

Note it looks like this field existed in the 3.x version and wasn't really honoured there either. however I could be wrong.

stesi561 commented 1 month ago

We have used this successfully to skip contacts that are in trash - however we still have remaining issues on the site where this is deployed with syncing invoices so would definitely recommend a test.

mattwire commented 1 month ago

@eileenmcnaughton I think I had similar in my branch - should be merged.