-
-
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
Fix inconsistent handling when searching contribution text fields #14354
Conversation
(Standard links)
|
@eileenmcnaughton |
@eileenmcnaughton |
@yashodha I agree. The implementation in this PR is actually generalised but the fields need to be 'metadata handled' to get it. Ideally we would convert the rest of the search forms to use metadata handling (currently grant & activity currently do & with this change participant will too). I expect that conversion to be the way we finally rid ourself of jcalendar. The various text fields also need to be converted - ie we add them to getSearchFieldMetadata We do need to be a little careful because lots of fields already have their own hack-handling. You can see I had to remove it for contribution_source. So, while I'd like to pick up pace on it I don't think we can do it en mass. Also note that once the fields are handled by metadata they should be supported as url parameters too. We still need to add this line
to each form - hopefully the best place to do that will reveal itself, since I would hope it can be moved to the parent class next round. Big picture, cleaning up the metadata & making it drive forms is one of 2 things we've been doing on an ongoing basis to prepare for an eventual leap in our form layer to something better (the other thing is moving logic out of the form layer & making it api-accessible & tested). Although this is kind of invisible we have made quite a lot of progress, which is evident from the apiv4 & various extensions that are leaning heavily on metadata these days. (@mattwire @seamuslee001 @colemanw - pinging as this is a long-form comment on something you've all been engaged with) |
I found that if you search on contribution source it adds wildcards & uses 'like' but with cancel_reason not so much. I found that for contribution_source there was field-specific hacky handling, so I converted both fields to be metadata based and added handling for string fields on the form layer
2404a37
to
7123f88
Compare
@yashodha I did just add in invoice_number since that was easy & you specifically tested it. I also note that the defaults thing also needs an extra step to work - that I won't try to add to this PR. I didn't convert trxn_id since I think we should be going in a different direction with that field - ie exposing the payment field instead |
@eileenmcnaughton I am happy to merge this :) |
Overview
I found that if you search on contribution source it adds wildcards & uses 'like' but with cancel_reason not so much, so you need the exact string
Before
After
Technical Details
I found that for contribution_source there was field-specific hacky handling, so I converted both fields
to be metadata based and added handling for string fields on the form layer
Comments
Per the images the qill formatting is inconsistent. This is not made worse by this PR & I would prefer to leave out of scope as I don't think it makes sense to do it without cleaning up the getWhereClause fn