-
-
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
Enotice fix on userDashboard with contributions, replace deprecated functions with api4v calls #24861
Conversation
(Standard links)
|
20d9bef
to
af19d23
Compare
CRM_Contact_Page_View_UserDashBoardTest::testDashboardContentContributions /home/jenkins/bknix-dfl/build/core-24861-1vbop/web/sites/default/files/civicrm/templates_c/en_US/%%D5/D5B/D5B2D140%%UserDashboard.tpl.php:35 Passing locally & I can't figure out what line it is :-( (smarty compiled is scrunched) |
af19d23
to
a6f039b
Compare
@eileenmcnaughton in Your Contributions section, the contributions are still not sorted by received date descending (look at the after screenshot) You might to want fix that as well while you are at it. |
General note, just to maks sure this is on your radar: |
98bb478
to
74d7c59
Compare
74d7c59
to
392d326
Compare
@yashodha - @colemanw & @seamuslee001 agreed your search order change made sense so I've included it. I had to adjust a test as a result @colemanw I added escaping. |
392d326
to
ad7cd11
Compare
'cs' => $this->getUserChecksum(), | ||
'cid' => $row['contact_id'], | ||
]), | ||
]; | ||
} | ||
} | ||
unset($row); |
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.
@eileenmcnaughton why is this here?
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.
it's just for clarity when you have a variable bleed out of a loop & it is a reference there is a bit of a risk of doing something odd with it
'amount_level', | ||
'contact_id,', | ||
'source', | ||
'balance_amount', |
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.
Just noting this is ok because it is a computed field
->setSqlRenderer([__CLASS__, 'calculateBalance']); |
test this please |
ad7cd11
to
9460617
Compare
1a436a0
to
505db67
Compare
test this please |
@eileenmcnaughton you might want to squash the commits |
Escape option-possible values Adjust test for change in order
505db67
to
b5900bc
Compare
@yashodha done |
@eileenmcnaughton merging this PR |
Yay - thanks @yashodha |
…on received date descending
Overview
Enotice fix on userDashboard with contributions
Before
After
Notice cleared
Technical Details
I wound up with some scope creep here as the notice turned out to be in the soft credits secion not the main section. This turned out to be accessing a function that was already recommended for deprecation & only accessed by tests. I switched to moving the test to check the dashboard rendered rather than the deprecated function.
As I was wrapping up discovered the
ContributionRecur
section used 3 different forms of deprecated function - including arequire_once
on the api utils file and the potentially bug-inducing$recurStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
accessing the wrong option group....
So in the end as I was deep in adding the tests I fixed all except one of the deprecated function uses
Comments
The
tpl
variables are also changed here a little - mostly around thehonorRows
which is not that accurate & is renamed tosoft_credit_contributions
& standardised with the contributions array. This should be surfaced in the release notes