-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
[Ref] cleanup alterActionSchedule #21047
Conversation
(Standard links)
|
We can simplify this function now as basicFields is keyed by the real field name and all pseudofields are already in basicFields.
bfce5d4
to
3fcf098
Compare
@colemanw also this has good cover in testTokenRendering |
foreach (array_keys($this->getPseudoTokens()) as $token) { | ||
$split = explode(':', $token); | ||
$e->query->select('e.' . $fields[$split[0]]['name'] . ' AS ' . $this->getEntityAlias() . $split[0]); | ||
foreach ($this->getReturnFields() as $token) { |
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 what has happened to the pseudo tokens?
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.
@seamuslee001 yeah - it turned out I never needed them - (or perhaps I did before I got it sane) what I was doing was adding in the field they need - ie contribution_status_id - but since that field is ALSO in getReturnFields 'under it's own name' - I don't need the spy-version
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.
(the tests specifically cover these )
Tests should cover us here merging |
thanks @seamuslee001 ! |
Overview
[Ref] cleanup alterActionSchedule
Before
More code
After
Less ... but since I pre-added really solid testing on this function we can be sure that a green light means it wasn't missed
Technical Details
We can simplify this function now as basicFields is keyed by the real field name and
all pseudofields are already in basicFields.
tests in
testTokenRendering
cover both pseudo & non pseudo fieldsComments