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.rbto accept & find by username instead ofentity_idfor users. - Update
ee/app/controllers/concerns/audit_events/audit_logs_params.rbto accept usernames for user entities. - Update
ee/app/finders/audit_log_finder.rbto accept & find by usernames for users - Update
ee/app/controllers/projects/audit_events_controller.rbto filter using the current user's username instead of id. - Update
ee/app/controllers/groups/audit_events_controller.rbto filter using the current user's username instead of id. - Update specs
frontend -
- Update
ee/app/assets/javascripts/audit_events/components/tokens/user_token.vueto get the user by username. - Update
ee/app/assets/javascripts/audit_events/components/tokens/member_token.vueto 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_numericand not a valid username. -
GlFilteredSearchSuggestionvalue should beusernameand notidfor users and members.
- Fetch suggestions only when not
- Update specs
Edited by Jiaan Louw

