Fix search by issue type (#1914)

* Fix search by issue type
This commit is contained in:
Ethan Koenig authored and Kim "BKC" Carlbäcker committed 2017-06-15 05:09:03 +02:00
1 parent bf48c8ebdd
commit 8fcda0442e
5 files changed
+121 -59

No files matched your search

+11 -1
View File
@@ -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
}
}