summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-15 11:24:41 +0800
committerUnknwon <u@gogs.io>2015-08-15 11:24:41 +0800
commit4ce003dc15eb4a283b9cc4b19e4a5e2de0b1b89f (patch)
treed191526511f64342b1d64dd7ca8beb8455402e60 /routers
parenta24141ec9cc1f47f89469a4ba1c1f583474d38db (diff)
downloadgitea-4ce003dc15eb4a283b9cc4b19e4a5e2de0b1b89f.tar.gz
gitea-4ce003dc15eb4a283b9cc4b19e4a5e2de0b1b89f.zip
Filter issues by assignee
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index dc86dedff0..623c94a387 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -92,6 +92,7 @@ func Issues(ctx *middleware.Context) {
repo := ctx.Repo.Repository
selectLabels := ctx.Query("labels")
milestoneID := ctx.QueryInt64("milestone")
+ assigneeID = ctx.QueryInt64("assignee")
isShowClosed := ctx.Query("state") == "closed"
issueStats := models.GetIssueStats(repo.ID, uid, com.StrTo(selectLabels).MustInt64(), milestoneID, isShowClosed, filterMode)
@@ -151,17 +152,24 @@ func Issues(ctx *middleware.Context) {
ctx.Data["Issues"] = issues
// Get milestones.
- miles, err := models.GetAllRepoMilestones(repo.ID)
+ ctx.Data["Milestones"], err = models.GetAllRepoMilestones(repo.ID)
if err != nil {
ctx.Handle(500, "GetAllRepoMilestones: %v", err)
return
}
- ctx.Data["Milestones"] = miles
+
+ // Get assignees.
+ ctx.Data["Assignees"], err = repo.GetAssignees()
+ if err != nil {
+ ctx.Handle(500, "GetAssignees: %v", err)
+ return
+ }
ctx.Data["IssueStats"] = issueStats
ctx.Data["SelectLabels"] = com.StrTo(selectLabels).MustInt64()
ctx.Data["ViewType"] = viewType
ctx.Data["MilestoneID"] = milestoneID
+ ctx.Data["AssigneeID"] = assigneeID
ctx.Data["IsShowClosed"] = isShowClosed
if isShowClosed {
ctx.Data["State"] = "closed"