-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
Preserve participant status when transferring #26187
Preserve participant status when transferring #26187
Conversation
(Standard links)
|
CRM/Event/Form/SelfSvcTransfer.php
Outdated
@@ -475,7 +476,7 @@ public function transferParticipantRegistration($toContactID, $fromParticipantID | |||
])['values']; | |||
unset($toParticipantValues['id']); | |||
$toParticipantValues['contact_id'] = $toContactID; | |||
$toParticipantValues['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Event_BAO_Participant', 'status_id', 'Registered'); | |||
$toParticipantValues['status_id'] = $statusID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@larssandergreen we could also just remove this line couldn't we? - I suspect it could have been required by create in the past but hopefully not now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, much better without.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should resolve the test failure too.
test fail CRM_Event_Form_ParticipantTest::testTransferParticipantRegistration /home/homer/buildkit/build/build-0/web/sites/all/modules/civicrm/CRM/Event/Form/SelfSvcTransfer.php:468 |
7a57b36
to
2c39a2a
Compare
thanks @larssandergreen ! |
Before
Whenever a registration was transferred, the status was set to Registered, which is definitely not what should happen if the status was On Waitlist or Pending (Pay Later) or others.
After
On transfer, status maintained.
Comments
In general, transferring seems fairly buggy to me, but I don't think this changes anything one way or another as far as when transferring works or fails for unknown reasons.