-
-
Notifications
You must be signed in to change notification settings - Fork 825
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/core#890 - Multiple line item shown on view contribution if parti… #16956
Conversation
(Standard links)
|
@jitendrapurohit the test fail relates |
0167cbf
to
b1e9ba4
Compare
Have updated the PR with the test fix @eileenmcnaughton |
This is the extraction portion of civicrm#16956 On testing that I hit an error but getting the extraction merged first should make it easierr to review future iterations as it will reduce noise in the code. Note I made the function non-static since it is still on the form & passed in event ID since we have it but it's otherwise pretty much the same as the extraction part of that PR
@jitendrapurohit I tested this with a different field type and got an error :-( Since I worked through the code change I pulled out the extraction into a separate PR to get that merged & make it easier to work through this - #16976 |
75d6311
to
14ebbd7
Compare
@eileenmcnaughton Have updated the PR and fixed the test. I tried to replicate the above db error but wasn't able to see any problems with different combinations of fields. From the backtrace, it seems event id was not retrieved on your side. This PR also modifies its value so it should already be handled. Can you pls confirm if you still notice the above error? Thanks. |
@@ -247,8 +247,6 @@ public static function checkProfileComplete($fields, &$errors, $self) { | |||
} | |||
if (!$email && !(CRM_Utils_Array::value('first_name', $fields) && | |||
CRM_Utils_Array::value('last_name', $fields))) { | |||
$defaults = $params = ['id' => $eventId]; |
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.
Why is this removed?
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.
Unnecessary lines. $eventId
is an undeclared variable.
CRM/Event/Form/SelfSvcTransfer.php
Outdated
* | ||
* @throws \CRM_Core_Exception | ||
* @throws \CiviCRM_API3_Exception | ||
*/ | ||
public function transferParticipantRegistration($toContactID, $fromParticipantID, $eventID) { | ||
$query = 'select role_id, source, fee_level, is_test, is_pay_later, fee_amount, discount_id, fee_currency,campaign_id, discount_amount from civicrm_participant where id = ' . $fromParticipantID; | ||
protected function transferParticipantRegistration($toContactID) { |
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.
So in terms of where we are going with this code - I'm hoping it would be moved to the BAO at some point as a move() function & called from the api. I mention this because this change makes the function more rather than less tied to the form it is on - which is the opposite direction
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.
cool. I've updated the PR to keep the fromParticipantID param :)
CRM/Event/Form/SelfSvcTransfer.php
Outdated
@@ -522,7 +518,7 @@ public function transferParticipantRegistration($toContactID, $fromParticipantID | |||
$value_to['fee_amount'] = $dao->fee_amount; | |||
} | |||
$value_to['contact_id'] = $toContactID; | |||
$value_to['event_id'] = $eventID; | |||
$value_to['event_id'] = $this->_event_id; |
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.
given the above query we should probably just get event_id in the query
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.
done. Have updated with the api4 call and created the toParticipant with the retrieved params 👍
@jitendrapurohit OK - the fatal errors occur when there is no associated contribution |
14ebbd7
to
16834ac
Compare
test this please |
@jitendrapurohit can you have a look at the failing test? |
Hmm, it looks like the details page does not display any specific test which is failing. From the console output https://test.civicrm.org/job/CiviCRM-Core-PR/33503/console, It seems the failure is resulted during the execution of EventTest::testTemplateFilterByDefault function?
I tried executing the same on my local and it displays a success message on completion.
|
retest this please |
@jitendrapurohit are you able to fix the conflicting files? |
…cipant is transferred to another contact
@jaapjansma Sorry for the delay. I've now updated the PR with the conflict fixes. Thanks. |
@jaapjansma can you pls remove the |
I re-tested this & it seems to work fine. Issues from previous comments have been addressed. Merging |
…cipant is transferred to another contact
Overview
Reopened #14104 with some changes to financial item entries as per #14104 (comment) (Solution 1 proposal).
Multiple line item shown on view contribution if participant is transferred to another contact
Before
To replicate -
Text / Numeric Quantity
field type. Amount = $10.I think the older participant status is set to "transferred" so it should remove the contribution link from the line item table?
After
Line item is displayed correctly.
Comments
Gitlab - https://lab.civicrm.org/dev/core/issues/890