-
Notifications
You must be signed in to change notification settings - Fork 8
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 bug when filtering anonymous feedback #1175
Conversation
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.
Thanks @MuriloDalRi - this fix looks nice and simple, but it's missing two things:
- A test.
- Removal of whatever code is causing the current behaviour of a random URL being added to the 'URL' field (like this: "/e38e5fb202880093ee51").
The current code won't show the feedback for an organisation unless a '/' URL is specified. https://trello.com/c/b8wn2ZQK/3252-improve-anonymousfeedback-search-behaviour-in-support-app-2
@ChrisBAshton I've added a test now. |
Thanks, the test looks good. Yep, we should remove the associated code as it now will no longer ever get evaluated. Aga reckons it's the https://github.com/alphagov/support/blob/main/app/models/support/requests/anonymous/paths.rb#L7 |
I don't think that's true, don't see any reason for removing it. |
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've just tried it out locally - and yes, looks like it will be difficult to unpick the SecureRandom. I believe it's used in the saved paths feature. By removing the hex, we're no longer storing at a unique key in Redis, and locally I was finding the search of /
was "sticking" and making it impossible to try to submit an empty form, which would kind of solve this issue but could also be hiding a more gnarly bug under the surface.
Your fix seems to work in a nice low-risk way, so happy to approve 👍
Thanks @ChrisBAshton |
The current code won't show the feedback for an organisation unless a '/' URL is specified.
https://trello.com/c/b8wn2ZQK/3252-improve-anonymousfeedback-search-behaviour-in-support-app-2