Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Convert previously shared function to non-static, remove unrelated code #19258

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Dec 23, 2020

Overview

[REF] Convert previously shared function to non-static, remove unrelated code

Before

Previously shared code, copied back to clean up, contains things unrelated / inaccessible from the membership back office form & is static

After

  • no longer static
  • handling for custom fields on contributions removed as not gathered on the form
  • handling for on_behalf removed as not gathered on the form
  • handling for contribution notes removed as not gathered on the form

Technical Details

There is no facility for creating on_behalf on back office membership forms
so this code, copied from the shared function, does not relate.

The activity IS created by Contribution.create - the extra code was
just to hack it around to doing on_behalf

Likewise, the back office membership form does not collect
data on contribution custom fields or notes so removing these
also makes sense here.

Comments

@civibot
Copy link

civibot bot commented Dec 23, 2020

(Standard links)

@civibot civibot bot added the master label Dec 23, 2020
@eileenmcnaughton eileenmcnaughton changed the title [REF] Convert previously shared function to non-static, remove unrela… [REF] Convert previously shared function to non-static, remove unrelated code Dec 23, 2020
…ted code

There is no facility for creating on_behalf on back office membership forms
so this code, copied from the shared function, does not relate.

The activity IS created by Contribution.create - the extra code was
just to hack it around to doing on_behalf

Likewise, the back office membership form does not collect
data on contribution custom fields or notes so removing these
also makes sense here.
@@ -1920,44 +1919,6 @@ public static function processFormContribution(
//CRM-13981, processing honor contact into soft-credit contribution
CRM_Contribute_BAO_ContributionSoft::processSoftContribution($params, $contribution);

if ($contribution) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just to articulate here, the reason for this is because no Contribution Custom fields are exposed on the Back office Membership form right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 exactly

@colemanw colemanw merged commit 179e6a1 into civicrm:master Dec 23, 2020
@eileenmcnaughton eileenmcnaughton deleted the recur_test branch December 23, 2020 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants