diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-06-14 23:09:03 -0400 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-06-15 05:09:03 +0200 |
commit | 8fcda0442e60209d7e6783c95d96f20ff04dbdd6 (patch) | |
tree | 8b47fcaab6003453ec319fc4960d959a2d06e6e9 /routers | |
parent | bf48c8ebdd3975d1090115a9106069796c67a6da (diff) | |
download | gitea-8fcda0442e60209d7e6783c95d96f20ff04dbdd6.tar.gz gitea-8fcda0442e60209d7e6783c95d96f20ff04dbdd6.zip |
Fix search by issue type (#1914)
* Fix search by issue type
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index c54cd28439..b94eddc4ef 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -120,6 +120,15 @@ func Issues(ctx *context.Context) { forceEmpty bool ) + if ctx.IsSigned { + switch viewType { + case "created_by": + posterID = ctx.User.ID + case "mentioned": + mentionedID = ctx.User.ID + } + } + repo := ctx.Repo.Repository selectLabels := ctx.Query("labels") milestoneID := ctx.QueryInt64("milestone") @@ -150,11 +159,12 @@ func Issues(ctx *context.Context) { MilestoneID: milestoneID, AssigneeID: assigneeID, MentionedID: mentionedID, + PosterID: posterID, IsPull: isPullList, IssueIDs: issueIDs, }) if err != nil { - ctx.Error(500, "GetSearchIssueStats") + ctx.Handle(500, "GetIssueStats", err) return } } |