-
-
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
Core/dev#692 : Use url search arguments in Activity Search forms [sub-PR of #13651] #13716
Conversation
(Standard links)
|
Can we please use the same approach on the activity form as in the grant search form which was the one where we experimented going down this track & also converting search date ranges Note this takes 'strings' from urls - which means minimum validation so we will probably need to review from a security pov |
@@ -308,14 +308,12 @@ public static function whereClauseSingle(&$values, &$query) { | |||
} | |||
|
|||
case 'activity_tags': | |||
$value = array_keys($value); |
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.
this is an unrelated cleanup? we could get this change merged I guess
* @return string|array | ||
*/ | ||
public function formatSpecialFormValue($name, $value, $dataType) { | ||
if ($dataType == 'Date') { |
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.
No, we should convert any date fields to datepicker first - e.g copy what was done on grant search. We don't want to build handling for the old format
@eileenmcnaughton can we discuss this patch? About what would be the best approach to include special fields, unlucky ones which didn't find its place in Activity.getFields API result |
@monishdeb OK - my mine review focus at the moment is to get the Payment.create code consolidated so I'm not digging too deep into this as yet. But, my goal would be to break this down & pick off the ones we can convert to using the existing methodology first & then look out how to handle some others. I'm imagining that those that can't be retrieved by getfields would be merged into those that CAN be retrieved by getfields within a line or 2 of that getfields call There is a lot in this PR - the first file touched is the Activtiy_BAO_Query so we would want any changes to that file to be in it's own PR with a unit test. I wonder why we aren't sharing handing for tags with the main tags where clause - feels like repetition |
This is pretty stale so I'm closing. I would note that the way we have been making fields url accessible is by adding them to the metadata - ie the 5 fields added to the form like this
Are url accessible. I took a quick look at adding tags - this would be the general approach - but it's not working yet |
Overview
This is a sub-PR of #13651. This PR extends the fix and make all possible activity search filters to be used as a url arguments on forced search using 'Find Activity' or 'Advance Search'
Before
Search arguments didn't work
After
Behavior on advanced search and 'Find Activity' search form:
![after](https://user-images.githubusercontent.com/3735621/53472901-fc0d2e00-3a8e-11e9-8eab-029f6f1c3d63.gif)
Comments
ping @eileenmcnaughton @colemanw @lcdservices