Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11345

improve primary location block check to avoid double save

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.6
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:

      Description

      when updating any location-type block (e.g. address), we run it through handlePrimary() to see if that record is being set as primary and others need to be unset, etc.

      currently that function first sets all block records to is_primary = 0, then proceeds with setting the appropriate one to is_primary. that unnecessarily causes two hits on the logging table for addresses that are being modified.

      the following patch removes the modified address from that second hit.
      https://github.com/nysenate/Bluebird-CRM/commit/282096d23babdd10113afdf056e0154a9def0fdf

        Attachments

          Activity

            People

            • Assignee:
              lcdweb Brian Shaughnessy
              Reporter:
              lcdweb Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: