-
-
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#1374 Fix search formValue handling on contribution search #15781
Conversation
(Standard links)
|
@eileenmcnaughton style fix issue |
c1ec4ff
to
e0e29fa
Compare
I was able to replicate the issue on 5.20 and confirmed that both are fixed. I feel like getting 1 sorted in 5.19 would be a nice to have but not a necessity I would also add that it looks like
|
@eileenmcnaughton i think the test fail relates here |
@seamuslee001 we probably want to change contribution_amount_low=75 to be total_amount_low=75 since that would be std. I don't know when it did work but ... master for that? |
This fixes 2 issues 1) Search params being lost when editing a related entity per https://lab.civicrm.org/dev/core/issues/1374 2) force=1&sort_name=p not working in contribution search url In digging I concluded the problem is we have 3 underlying arrays which we keep jumbling together 1) formValues - the actual submitted values, augmented by any url passed params 2) the default values - values to load by default on the form 3) our working query params - a copy of formValues that we have prepared for the query We need to stop mangling them. I added subtle code comments
e0e29fa
to
e9f5171
Compare
@seamuslee001 ok - I think it's legit to change the test set up here |
ok added Merge on Pass |
Backporting this to 5.19 could be helpful, as paging thru contribution search is borked (shows all results).. but yes, doesn't apply cleanly... |
Overview
This fixes 2 issues
https://lab.civicrm.org/dev/core/issues/1374
Before
"On dmaster just now, I searched for contributions with amount from 800 to 800, got 18 results. Edited one of them and saved. Listing now shows all contributions (93). Opening Search criteria I see that the 800 to 800 criteria are still there. Clicking search button gets back original search results of 18 records.
Seems like when closing edit form, there is a refresh of search, but the refresh is missing the criteria. IIRC, there was a recent fix where only the edited item showed up after saving the edit form. So possible regression. This is an irritation rather than crucial functionality."
Also adding force=1&sort_name=p does not work in contribution search
After
Above fixed
Technical Details
In digging I concluded the problem is we have 3 underlying arrays which we keep jumbling together
We need to stop mangling them. I added subtle code comments
Comments
@seamuslee001 enough has happened between 5.19 & 5.20 I think it might be fine to put this in the rc but not port to 5.19