MinnPost / object-sync-for-salesforce

WordPress plugin that maps and syncs data between Salesforce objects and WordPress objects.
https://wordpress.org/plugins/object-sync-for-salesforce/
GNU General Public License v2.0
93 stars 49 forks source link

The `pull_merge_last` option value is retrieved incorrectly on merge operations #466

Closed jonathanstegall closed 2 years ago

jonathanstegall commented 2 years ago

Describe the bug When running a merge operation (with SOAP), we generate the SOQL query based on the last time the query ran. That last time is stored as a timestamp in an option value such as object_sync_for_salesforce_pull_merge_last_Contact_2. However it is being retrieved incorrectly, as object_sync_for_salesforce_pull_merge_last_Contact, which because it has never been set ends up just using the default timestamp. This prevents merged records from being retrieved.

I think this has been a bug since 2.1.0, though I'm not positive on that.

To Reproduce Steps to reproduce the behavior:

  1. enable merging on a fieldmap
  2. merge some records that apply to that fieldmap
  3. see that they are not merged

Note: discovered later that this was also happening with deletes since 2.1.0. What a mess.