CRM-18163 Unsupervised Organization Rule for On Behalf Of Contributions

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.10, 4.7.1
    • Fix Version/s: 4.7.5
    • Component/s: CiviContribute
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      See http://civicrm.stackexchange.com/questions/10169/dedupe-rule-for-organization-always-firing-on-membership-signup-form, with problem replicated on dmaster.demo.civicrm.org. I replicated on a 4.6.10 installation when making donations as an unauthenticated user with same on behalf of org name and different postal code that the org created by first donation was updated with information despite no matching on unsupervised rule. Bug appears whether or not same individual contact is making donation - seems to be that just Org Name is used rather than Unsupervised Rule.

      If there is no match for configured unsupervised rule for orgs, then the on behalf of organization should be created rather than an update be done on org that matches just on Org Name. An automated test should be added for this.

        Attachments

          Activity

          [CRM-18163] Unsupervised Organization Rule for On Behalf Of Contributions
          Pradeep Nayak added a comment -
          Edsel Lopez added a comment -

          Breaks functionality fixed at CRM-15182

          Duplicate org is created if City field not present in on behalf of profile.

          Joe Murray added a comment -

          Could you generalize about City field. Shouldn't it depend on unsupervised org match rule and its fields. Certainly if City is not one of those fields then it should be fine to ignore it.

          Pradeep Nayak added a comment -
          Joe Murray added a comment -

          Coleman, could you merge the PR after review?

          1) We initially fixed things so that on behalf of used the default unsupervised rule rather than just org name to search for existing organizations to match and update rather than creating new ones.
          2) Doing that caused error from CRM-15182 to recur. The fix for that issue was the one which caused this issue. Now a logged in user can select an existing contact to contribute on behalf of and then change fields in the profile that previously caused a match to fail on dupe match rule. And there are tests.

          Chris Cant added a comment -

          This was causing us problems as we're on 4.6. We do have separate organisations with the same name, so join/renew was causing confusing mixups in the records.

          I put in a similar fix in CRM\Contribute\Form\Contribution\Confirm.php but also found that I needed to change template CRM\Contribute\Form\Contribution\OnBehalfOf.tpl to add
          <input type="hidden" id="onbehalfof_id" name="onbehalfof_id" />
          and add at the start of setLocationDetails():
          if( !contactID)

          { return; }

          We want to remove the "Enter a new organization" option so I've made these changes a customisation for our site.
          I'll have to review if/when we upgrade to 4.7 or later.

          I don't know enough about the use cases to be able to suggest a comprehensive fix for 4.6 sorry.

            People

            • Assignee:
              Coleman Watts
              Reporter:
              Joe Murray

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 20 minutes
                4h 20m