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

dev/financial#74 Create ParticipantPayment record for every participant when registering multiple participants for event #15555

Closed
wants to merge 4 commits into from

Conversation

mattwire
Copy link
Contributor

Overview

We have ParticipantPayment and MembershipPayment records in CiviCRM which link a contribution to a participant / membership and show which contribution was used to "pay" for the participant/membership. ParticipantPayment is not actually used very much, compared with MembershipPayment which is used for various UI forms when showing related memberships / contributions etc.
It was identified at the sprint in Barcelona that when registering multiple participants a ParticipantPayment record was only being created for the primary participant instead of for all participants.

Before

Only one participantPayment record created for multiple participant registration

After

One participantPayment record created for each participant in a multiple participant registration

Technical Details

The Order API creates one per participant. The MembershipPayment / ParticipantPayment records are not supposed to show who paid (that can be identified from the contribution) but is supposed to show that "this membership/participant" was paid for from this contribution.

Comments

@mecachisenros @eileenmcnaughton This is what we found at the sprint
Thanks @sarvesh211999 for the unit test

@civibot
Copy link

civibot bot commented Oct 20, 2019

(Standard links)

@civibot civibot bot added the master label Oct 20, 2019
@mattwire mattwire force-pushed the participant_cleanup branch from 92b293b to 05487f3 Compare October 20, 2019 20:01
@seamuslee001
Copy link
Contributor

@mattwire

PHP Fatal error:  Cannot declare class CRM_Event_Form_Registration_ConfirmTest, because the name is already in use in /home/jenkins/bknix-dfl/build/core-15555-i9ur/web/sites/all/modules/civicrm/tests/phpunit/CRM/Event/Form/Registration/ConfirmMultipleParticipantTest.php on line 103

@eileenmcnaughton
Copy link
Contributor

eileenmcnaughton commented Oct 21, 2019

Looking at the code I find it more convincing that this was a bug since this appears to be fixing something that was broken rather than changing behaviour - it could even be a recent regression? We should double check when if (empty($ids['contribution'])) { stopped being true

@eileenmcnaughton
Copy link
Contributor

Hmm - OK I looked & I think master is OK for this - I can't see evidence this was a recent regression - it probably regressed a while back but I now believe it IS a regression rather than a behaviour change

@mattwire mattwire force-pushed the participant_cleanup branch 2 times, most recently from cff4814 to bf8716c Compare October 21, 2019 09:22
@seamuslee001
Copy link
Contributor

@mattwire test failure looks related

@mattwire mattwire force-pushed the participant_cleanup branch from bf8716c to 66558d0 Compare October 23, 2019 11:57
@eileenmcnaughton
Copy link
Contributor

@mattwire still related fails :-(

@mattwire mattwire force-pushed the participant_cleanup branch from 66558d0 to f92c4b4 Compare October 27, 2019 13:19
@eileenmcnaughton
Copy link
Contributor

@mattwire still failing :-(

@mattwire mattwire force-pushed the participant_cleanup branch from f92c4b4 to eee9a82 Compare October 30, 2019 14:21
@mattwire mattwire added needs-work-not-review-ready Submitter required to take action, will be closed after 1-2 weeks in this state sig:bug labels Nov 1, 2019
@mattwire mattwire force-pushed the participant_cleanup branch from eee9a82 to 62c1164 Compare November 13, 2019 07:24
@mattwire mattwire changed the title Create ParticipantPayment record for every participant when registering multiple participants for event WIP Create ParticipantPayment record for every participant when registering multiple participants for event Feb 21, 2020
@mattwire mattwire force-pushed the participant_cleanup branch from 5fb827c to d67809b Compare February 21, 2020 21:34
@mattwire mattwire changed the title WIP Create ParticipantPayment record for every participant when registering multiple participants for event dev/financial#74 Create ParticipantPayment record for every participant when registering multiple participants for event Mar 4, 2020
@mattwire
Copy link
Contributor Author

mattwire commented Mar 4, 2020

Closing for now as there is no reasonable chance that I'm going to circle back to this any time soon. Its's being tracked via https://lab.civicrm.org/dev/financial/issues/74 @eileenmcnaughton if you get chance to take a look at any of this, it already has a test here :-) The issue I hit is a rabbit hole of converting follow-on code (ie. receipting code etc) to read from an array instead of an integer variable. I know you've done some cleanup so it might be easier now.

@mattwire mattwire closed this Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-test master needs-work-not-review-ready Submitter required to take action, will be closed after 1-2 weeks in this state sig:bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants