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] Remove copy and paste overkill #19786

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Mar 11, 2021

Overview

Remove some code that is on this form due to previously being present in code shared with the front end form but doesn't make sense here

Before

  • A transaction is used - but not in a way that reflects the form
  • A form variable is used - but only in one of many flows through the form

After

poof

Technical Details

This is a previously shared function that was copied and pasted back. However in the
context of this form they don't make sense because

  1. It doesn't make sense to try to maintain the integrity (via the transaction)
    of the contribution & recurring contribution over & above the other
    items on the form - without the memberships they don't actually have integrity
    and this might have made a little more sense front end in terms
    of ensuring they were committed if a payment is made but
    we can expect a back office user to observe an error

  2. setting the contribution id on the form here doesn't make sense as
    this line is only hit for credit-card recurring contributions and
    either we are doing it elsewhere anyway or we should do it nowhere - there
    is no logic for 'only do this in this one obscure flow' that makes
    sense back office. Front office this was likely added for an otherwise missed
    scenario

Comments

@civibot
Copy link

civibot bot commented Mar 11, 2021

(Standard links)

@civibot civibot bot added the master label Mar 11, 2021
@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 are you OK to merge this - I think I've made the case why the lines (originally copied from the front end form) don't make sense on the backend form given that they ONLY apply to a narrow range of submissions on this form

@seamuslee001
Copy link
Contributor

@eileenmcnaughton can you rebase now

This is a previously shared function that was copied and pasted back. However in the
context of this form they don't make sense because

1) It doesn't make sense to try to maintain the integrity (via the transaction)
of the contribution & recurring contribution over & above the other
items on the form - without the memberships they don't actually have integrity
and this might have made a little more sense front end in terms
of ensuring they were committed if a payment is made but
we can expect a back office user to observe an error

2) setting the contribution id on the form here doesn't make sense as
this line is only hit for credit-card recurring contributions and
either we are doing it elsewhere anyway or we should do it nowhere - there
is no logic for 'only do this in this one obscure flow' that makes
sense back office. Front office this was likely added for an otherwise missed
scenario
@colemanw
Copy link
Member

test this please

@eileenmcnaughton eileenmcnaughton merged commit 2bc1677 into civicrm:master Mar 12, 2021
@eileenmcnaughton eileenmcnaughton deleted the mem4 branch March 12, 2021 19:43
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