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

Fix bug whereby cidZero does not prepopulate billing details for selected contact for pay later. #15565

Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fixes a pretty obscure bug when selecting a different contact to fill in the form for

To replicate

  1. create a contribution page & select pay later (and no other processor) with 'billing address required'
  2. access the contribution page with cid=0 in the url
  3. select a contact - witness the contacts detaisl have NOT loaded into the billing block
  4. follow the same steps on event

Before

Prefill after selecting contact:

Screen Shot 2019-10-21 at 5 44 32 PM

After

Prefill after selecting contact:

Screen Shot 2019-10-21 at 5 58 59 PM

Technical Details

I was trying to reduce complexity on this form for another change (exposing payment processor title if available) when I realised that the variable
to determine whether to show the block was wrong in the scenario when billing details were required for
pay later .On testing there seemed now downside (other than a very minor performance
hit in obscure circumstances) in just always loading the billing profile details.

I saw no js error when the billing block was NOT present and we are already checking
the person has access to see the contact so that is not an issue here (Profile.get
does a permission check

Comments

@kcristiano are you able to test & see if you agree with this?

…cted contact for pay later.

To replicate
1) create a contribution page  & select  pay later   (and no other processor)  with 'billing  address required'
2) access the contribution page with cid=0 in the url
3) select a contact - witness  the contacts  detaisl have NOT loaded  into the billing block
4) follow the same steps  on event

I was trying to reduce complexity on  this form for another  change when  I realised  that  the variable
to determine  whether to show the block  was  wrong  when  billing details  were  required  for
pay later and  on testing  there  seemed now downside (other than a very minor performance
hit in  obscure  circumstances) in just always loading the billing profile  details.

I saw no js error  when the billing block was  NOT present  and we are already checking
the person has access  to see the contact so that is not an issue here (Profile.get
does a permission check
@civibot
Copy link

civibot bot commented Oct 21, 2019

(Standard links)

@civibot civibot bot added the master label Oct 21, 2019
@kcristiano
Copy link
Member

@eileenmcnaughton I was able to test. I can re-create the same lack of billing info following the steps to reproduce.

Applying the patch fixes the issue.

@eileenmcnaughton
Copy link
Contributor Author

Thanks @kcristiano

@eileenmcnaughton eileenmcnaughton merged commit 76b0950 into civicrm:master Oct 21, 2019
@eileenmcnaughton eileenmcnaughton deleted the payment_processor_label branch October 21, 2019 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants