Browse Source

Merge pull request 'fix-646后端部分' (#1148) from fix-1052 into V20211228

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1148
Reviewed-by: lewis <747342561@qq.com>
tags/v1.21.12.2^2
lewis 4 years ago
parent
commit
54fc88e6da
2 changed files with 5 additions and 1 deletions
  1. +2
    -0
      models/issue.go
  2. +3
    -1
      routers/repo/issue.go

+ 2
- 0
models/issue.go View File

@@ -1397,6 +1397,8 @@ func getIssueStatsChunk(opts *IssueStatsOptions, issueIDs []int64) (*IssueStats,

if opts.MilestoneID > 0 {
sess.And("issue.milestone_id = ?", opts.MilestoneID)
} else if opts.MilestoneID == -1 { //only search for issues do not have milestone
sess.And("issue.milestone_id = ?", 0)
}

if opts.AssigneeID > 0 {


+ 3
- 1
routers/repo/issue.go View File

@@ -193,6 +193,8 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB
var mileIDs []int64
if milestoneID > 0 {
mileIDs = []int64{milestoneID}
} else if milestoneID == -1 { //only search no milestone
mileIDs = []int64{0}
}

var issues []*models.Issue
@@ -355,7 +357,7 @@ func Issues(ctx *context.Context) {

var err error
// Get milestones.
ctx.Data["Milestones"], err = models.GetMilestonesByRepoID(ctx.Repo.Repository.ID, api.StateType(ctx.Query("state")), models.ListOptions{})
ctx.Data["Milestones"], err = models.GetMilestonesByRepoID(ctx.Repo.Repository.ID, api.StateAll, models.ListOptions{})
if err != nil {
ctx.ServerError("GetAllRepoMilestones", err)
return


Loading…
Cancel
Save