Skip to content

Commit df76d9f

Browse files
authored
Show correct issues for team dashboard (#14952)
* 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 #14941 * don't spam a warning for a perfectly fine request
1 parent a44b2d0 commit df76d9f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

routers/user/home.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,9 @@ func buildIssueOverview(ctx *context.Context, unitType models.UnitType) {
432432
case models.FilterModeCreate:
433433
opts.PosterID = ctx.User.ID
434434
case models.FilterModeMention:
435-
opts.MentionedID = ctxUser.ID
435+
opts.MentionedID = ctx.User.ID
436436
case models.FilterModeReviewRequested:
437-
opts.ReviewRequestedID = ctxUser.ID
437+
opts.ReviewRequestedID = ctx.User.ID
438438
}
439439

440440
if ctxUser.IsOrganization() {
@@ -709,7 +709,7 @@ func buildIssueOverview(ctx *context.Context, unitType models.UnitType) {
709709
}
710710

711711
func getRepoIDs(reposQuery string) []int64 {
712-
if len(reposQuery) == 0 {
712+
if len(reposQuery) == 0 || reposQuery == "[]" {
713713
return []int64{}
714714
}
715715
if !issueReposQueryPattern.MatchString(reposQuery) {

0 commit comments

Comments
 (0)