Skip to content

Commit

Permalink
Show correct issues for team dashboard (go-gitea#14952)
Browse files Browse the repository at this point in the history
* fix no items under /org/$org/{issues,pulls}?type=mentioned

it was filtering by org id, but org-mentions are not persisted like that
to the DB, we need to filter by UID.
This means, selecting different teams will only have an effect on the
selected repos, otherwise results will be the same, which may be
suboptimal.

fixes go-gitea#14941

* don't spam a warning for a perfectly fine request
  • Loading branch information
noerw authored Mar 12, 2021
1 parent a44b2d0 commit df76d9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routers/user/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,9 @@ func buildIssueOverview(ctx *context.Context, unitType models.UnitType) {
case models.FilterModeCreate:
opts.PosterID = ctx.User.ID
case models.FilterModeMention:
opts.MentionedID = ctxUser.ID
opts.MentionedID = ctx.User.ID
case models.FilterModeReviewRequested:
opts.ReviewRequestedID = ctxUser.ID
opts.ReviewRequestedID = ctx.User.ID
}

if ctxUser.IsOrganization() {
Expand Down Expand Up @@ -709,7 +709,7 @@ func buildIssueOverview(ctx *context.Context, unitType models.UnitType) {
}

func getRepoIDs(reposQuery string) []int64 {
if len(reposQuery) == 0 {
if len(reposQuery) == 0 || reposQuery == "[]" {
return []int64{}
}
if !issueReposQueryPattern.MatchString(reposQuery) {
Expand Down

0 comments on commit df76d9f

Please sign in to comment.