-
Notifications
You must be signed in to change notification settings - Fork 719
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 filter APIs #1341
Fix filter APIs #1341
Conversation
@@ -614,6 +614,7 @@ private function convertTypeToJson( &$p_criteria ) { | |||
unset( $p_criteria['_version'] ); | |||
unset( $p_criteria['_source_query_id'] ); | |||
unset( $p_criteria['_view_type'] ); | |||
unset( $p_criteria['_filter_id'] ); |
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.
I am not familiar with the external apis.
Returning filter id is bad in this case?
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 code here is to remove _filter_id
from the criteria, since it is usually surfaced as id
and it is part of the filter rather than the filter criteria.
core/filter_api.php
Outdated
$t_row['user_id'] = filter_get_field( $t_filter_id, 'user_id' ); | ||
$t_row['name'] = $t_filter_name; | ||
$t_row['is_public'] = filter_get_field( $t_filter_id, 'is_public' ); | ||
$t_row['project_id'] = filter_get_field( $t_filter_id, 'project_id' ); |
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.
As far as i can tell, the new values added here were not part of the array in the previous code
(see 13b9aef)
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 old code operated on a filter_row
which included such fields. The new code gets the filter criteria which doesn't include such fields.
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.
What about filter_string field? It is required in API method mc_filter_get (api/soap/mc_filter_api.php)
I'm planning to target this to |
The filter API was broken by recent refactoring causing it to return invalid id, name, public, and extra _filter_id. This broke both REST and SOAP APIs. Fixes #24335, #24349
8e94e3b
to
9f4e219
Compare
I have updated the PR to also fix the SOAP API. |
Merged via b739c9f |
The filter API was broken by recent refactoring causing it to return invalid id, name, public, and extra _filter_id. This impacted both SOAP and REST APIs.
Fixes #24335, #24349