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

Add filtering by team, is_currently_oncall and search on the user page #4575

Merged
merged 6 commits into from
Jul 8, 2024

Conversation

iskhakov
Copy link
Contributor

@iskhakov iskhakov commented Jun 24, 2024

What this PR does

This PR adds filtering by team and is_currently_oncall on the user page

Which issue(s) this PR closes

Closes #4353

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • Added the relevant release notes label (see labels prefixed w/ release:). These labels dictate how your PR will
    show up in the autogenerated release notes.

@iskhakov iskhakov marked this pull request as ready for review June 24, 2024 03:05
@iskhakov iskhakov requested review from a team as code owners June 24, 2024 03:05
@iskhakov iskhakov changed the title Add user page filters Add filtering by team, is_currently_oncall and search on the user page Jun 24, 2024
@iskhakov iskhakov added release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes pr:no public docs Added to a PR that does not require public documentation updates labels Jun 24, 2024
});
};

applyFilters = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems this method is unused, can we remove it? Not related to your changes but there's another unused method in this component - renderContacts, we could remove it too

@brojd brojd self-requested a review June 24, 2024 06:01
Comment on lines +859 to +860
if filter_name is not None:
filter_options = list(filter(lambda f: filter_name in f["name"], filter_options))
Copy link
Member

Choose a reason for hiding this comment

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

does the frontend use this search functionality? if not, I think it might make sense to remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it does

Copy link
Member

Choose a reason for hiding this comment

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

I can't find any usages in the frontend code 🤔 Am I missing something?

@@ -841,6 +842,25 @@ def export_token(self, request, pk) -> Response:
return Response(status=status.HTTP_204_NO_CONTENT)
return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED)

@action(methods=["get"], detail=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we have openapi docs for the /users routes (code). do we need to add anything here to document this new endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, added

@CLAassistant
Copy link

CLAassistant commented Jul 8, 2024

CLA assistant check
All committers have signed the CLA.

@iskhakov iskhakov added this pull request to the merge queue Jul 8, 2024
Merged via the queue into dev with commit 24aa3a5 Jul 8, 2024
21 checks passed
@iskhakov iskhakov deleted the iskhakov/user-filters branch July 8, 2024 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filters to users page
5 participants