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 option to filter board cards by labels and assignees #31999

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

lafriks
Copy link
Member

@lafriks lafriks commented Sep 6, 2024

Works in both organization and repository project boards

Fixes #21846

Replaces #21963
Replaces #27117

image

Note that implementation was made intentionally to work same as in issue list so that URL can be bookmarked for quick access with predefined filters in URL

@lafriks lafriks added type/feature Completely new functionality. Can only be merged if feature freeze is not active. topic/projects labels Sep 6, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 6, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 6, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Sep 6, 2024
@lafriks lafriks added this to the 1.23.0 milestone Sep 6, 2024
@techknowlogick
Copy link
Member

Thanks @lafriks!! <3

I haven't tested this yet, but how does it handle the case with changing sort when some items are hidden?

@lunny
Copy link
Member

lunny commented Sep 7, 2024

How did you load the labels for the repository project, org project, and user projects. I think all of them are different.

  • For repository project, we just need to load the labels of this repository.
  • For org project, we may need to load all the labels of all repositories of this org as well as the org' labels.
  • For user project, since there is no user level labels, we need to load all the labels of all repositories of this user.

@lafriks
Copy link
Member Author

lafriks commented Sep 8, 2024

For labels I did:

  • Repo project: Load org (if organization is owner) and repo labels (same as issue list is doing)

  • Org projects: load only organization labels as adding labels for all repositories would be overkill imho and would be hard to merge same named labels from different repos together

For assignees I did:

  • Repo project: all assignable users for that repo

  • Org projects: all assignable users for all that organization repos

@lafriks
Copy link
Member Author

lafriks commented Sep 10, 2024

I haven't tested this yet, but how does it handle the case with changing sort when some items are hidden?

It work okeyish imho, don't see anything broken

label-filter-sorting.webm

@lunny
Copy link
Member

lunny commented Sep 10, 2024

  • Org projects: load only organization labels as adding labels for all repositories would be overkill imho and would be hard to merge same named labels from different repos together

Looks like for Org projects, since the issues on this project may also contain repository labels, how did we handle the situation?

@lafriks
Copy link
Member Author

lafriks commented Sep 10, 2024

Currently in org projects you can not filter by repo only labels but that imho can be left for future improvement, mostly if you are using org projects you should be using org labels (at least if you want to filter by them in org project view) 😅

@lunny
Copy link
Member

lunny commented Sep 10, 2024

Currently in org projects you can not filter by repo only labels but that imho can be left for future improvement, mostly if you are using org projects you should be using org labels 😅

OK. Please add some TODO or FIXME there.

@lafriks
Copy link
Member Author

lafriks commented Sep 10, 2024

@lunny added todo comment

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 10, 2024
@techknowlogick
Copy link
Member

@lafriks amazing! Thank you so much!

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 12, 2024
@techknowlogick techknowlogick enabled auto-merge (squash) September 12, 2024 02:39
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 12, 2024
@techknowlogick techknowlogick merged commit 4ab6fc6 into go-gitea:main Sep 12, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 12, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 12, 2024
* giteaofficial/main:
  Add option to filter board cards by labels and assignees (go-gitea#31999)
@lafriks lafriks deleted the feat/board_filter branch September 12, 2024 05:18
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/projects type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project board card filtering
4 participants