Modifying filter attribute in audit events only shows id number
Summary
When hitting back, the filter option changes from a name to its id number.
Steps to reproduce
Make a selection for any filter option, and then hit backspace
What is the expected correct behavior?
Show the string, so that the dropdown gives the right options instead of saying no results.
Implementation
backend -
- Update
ee/app/controllers/admin/audit_logs_controller.rb
to accept & find by username instead ofentity_id
for users. - Update
ee/app/controllers/concerns/audit_events/audit_logs_params.rb
to accept usernames for user entities. - Update
ee/app/finders/audit_log_finder.rb
to accept & find by usernames for users - Update
ee/app/controllers/projects/audit_events_controller.rb
to filter using the current user's username instead of id. - Update
ee/app/controllers/groups/audit_events_controller.rb
to filter using the current user's username instead of id. - Update specs
frontend -
- Update
ee/app/assets/javascripts/audit_events/components/tokens/user_token.vue
to get the user by username. - Update
ee/app/assets/javascripts/audit_events/components/tokens/member_token.vue
to get the member by username. - Update
ee/app/assets/javascripts/audit_events/components/tokens/shared/audit_filter_token.vue
:- Fetch suggestions only when not
is_numeric
and not a valid username. -
GlFilteredSearchSuggestion
value should beusername
and notid
for users and members.
- Fetch suggestions only when not
- Update specs
Edited by Jiaan Louw