Skip to content
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

Set default filtering for training requests #2381

Merged

Conversation

elichad
Copy link
Contributor

@elichad elichad commented Apr 13, 2023

Fixes #2315.
Stopgap for #2314 - the filtered view still performs a bit slowly on the full AMY database (link), but it shouldn't be catastrophic any more.

This implementation only sets the defaults if the user has chosen not to filter at all - i.e. it is still possible to see all training requests by explicitly selecting the blank options for these fields in the filter UI (or setting the URL query string to ?state=&matched=)
Note that setting defaults for requests that do include user-selected filter choices is not recommended.

@pbanaszkiewicz pbanaszkiewicz added this to the v4.1 milestone Apr 16, 2023
Copy link
Contributor

@pbanaszkiewicz pbanaszkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

query_string = "state=&matched="

# Act
rv = self.client.get(reverse("all_trainingrequests"), QUERY_STRING=query_string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I didn't know about QUERY_STRING=.

@elichad elichad merged commit 51e558d into develop Apr 17, 2023
@elichad elichad deleted the feature/2315-Add-filter-for-default-training-requests-view branch April 17, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filter for default training requests view
2 participants