Skip to main content
9 events
when toggle format what by license comment
Mar 2, 2016 at 17:36 comment added samuelsov The proposed patch removes all updates from contribution status to membership status. If you only want to remove the canceled contribution from being applied to the membership, you should only deactivate the part in : if ($contributionStatusId == array_search('Cancelled', $contributionStatuses)) { ... }
Jun 1, 2015 at 17:34 history bounty ended diegov
Jun 1, 2015 at 17:34 vote accept diegov
May 26, 2015 at 8:25 comment added luciano_s When the Contribution is Canceled it sets the Membership status to Canceled, when the Contribution is Failed it changes the Membership status to Expired. As I said, it is the expected behavior of CiviCRM by design. you can check in source code where the Membership is expired: github.com/civicrm/civicrm-core/blob/4.6/CRM/Contribute/BAO/…
May 25, 2015 at 17:24 comment added diegov Thank you Luciano, but I checked in my system that the contributions are not Cancelled, but Failed, another kind of status. I took a look at Contribution.php#L1542 and saw that a failed Contribution should result in an expired Membership, is my understand correct? If so, I still can't see why those Memberships are being Cancelled by the system. Could it be a bug?
May 25, 2015 at 16:37 comment added luciano_s I agree, definitely patching civicrm core needs a lot of care when you upgrade CiviCRM versions. But I didn't find a better way to fix this. In an extension you would have to override CRM_Contribute_BAO_Contribution anyway to avoid this behavior with the same consequences
May 25, 2015 at 16:33 comment added Jaap Jansma - CiviCooP I do think this patch is good to solve the functional need in your project. However keep in mind that when you are patching CiviCRM your upgrades to a newer version requires you to review all the patches you have made. So from maintancability I would suggest to try to implment this in an extension. That is probably a little bit more complex. However it probably saves your headaches in the futrure when upgrading civicrm.
May 25, 2015 at 14:57 history edited luciano_s CC BY-SA 3.0
answer
May 25, 2015 at 14:50 history answered luciano_s CC BY-SA 3.0