[PR #3438] [CLOSED] Add the ability to use multiple labels as filters #16943

Closed
opened 2025-11-02 12:22:39 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3438
Author: @erjiaqing
Created: 1/31/2018
Status: Closed

Base: masterHead: issue_3430


📝 Commits (7)

📊 Changes

6 files changed (+73 additions, -5 deletions)

View changed files

📝 models/issue.go (+22 -2)
📝 models/issue_label.go (+21 -0)
📝 models/issue_test.go (+9 -1)
📝 routers/repo/issue_label.go (+19 -0)
📝 routers/routes/routes.go (+1 -1)
📝 templates/repo/issue/list.tmpl (+1 -1)

📄 Description

Implements Issue #3430

multiplelabels

As in GitHub, when selecting multiple labels, only display those issues with all the labels selected.

I cannot figure out how to achieve this using the orm provided, so I write a subquery.

Then I use Label.QueryString and Label.IsSelected for the query string(issues?labels=xxx) and the tick before labels.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3438 **Author:** [@erjiaqing](https://github.com/erjiaqing) **Created:** 1/31/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `issue_3430` --- ### 📝 Commits (7) - [`0d10b62`](https://github.com/go-gitea/gitea/commit/0d10b62e082578639ad515ccc7cde07e09fcce4e) Add the ability to use multiple labels as filters (#3430) - [`e33b02e`](https://github.com/go-gitea/gitea/commit/e33b02e4e4a4b1e83d270083d001d9f00e0ccefa) to fix a bug when select only one label - [`01252ba`](https://github.com/go-gitea/gitea/commit/01252ba2fd41203c21721698b2dbfdd5984e2a41) fix format - [`5d80044`](https://github.com/go-gitea/gitea/commit/5d800446e5e36b55b640d1da2b07fed72f480d9f) rename some variables and functions - [`ccf7056`](https://github.com/go-gitea/gitea/commit/ccf70563b16b85e539ca196139a39b5ea6280b0b) update tests to match expected value - [`35e0f5b`](https://github.com/go-gitea/gitea/commit/35e0f5b3cc02907c414157bf7c87e86563d75641) Update issue_test.go - [`5f08f1b`](https://github.com/go-gitea/gitea/commit/5f08f1bc0ac685c8e0fd983ca652ee363625395f) fix test ### 📊 Changes **6 files changed** (+73 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `models/issue.go` (+22 -2) 📝 `models/issue_label.go` (+21 -0) 📝 `models/issue_test.go` (+9 -1) 📝 `routers/repo/issue_label.go` (+19 -0) 📝 `routers/routes/routes.go` (+1 -1) 📝 `templates/repo/issue/list.tmpl` (+1 -1) </details> ### 📄 Description Implements Issue #3430 ![multiplelabels](https://user-images.githubusercontent.com/5517838/35624310-9ba558f2-06c9-11e8-8b89-1fd16c3f73f8.png) As in GitHub, when selecting multiple labels, only display those issues with all the labels selected. I cannot figure out how to achieve this using the orm provided, so I write a subquery. Then I use `Label.QueryString` and `Label.IsSelected` for the query string(issues?labels=xxx) and the tick before labels. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:22:39 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16943