diff options
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/issue.go | 2 | ||||
-rw-r--r-- | routers/repo/pull.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index f6d6f32e32..e821c130c4 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -350,7 +350,7 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) { issue := &models.Issue{ RepoID: ctx.Repo.Repository.ID, - Index: int64(repo.NumIssues) + int64(repo.NumPulls) + 1, + Index: repo.NextIssueIndex(), Name: form.Title, PosterID: ctx.User.Id, Poster: ctx.User, diff --git a/routers/repo/pull.go b/routers/repo/pull.go index eb06becb8d..19f9f5b8e2 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -598,7 +598,7 @@ func CompareAndPullRequestPost(ctx *middleware.Context, form auth.CreateIssueFor pull := &models.Issue{ RepoID: repo.ID, - Index: int64(repo.NumIssues) + 1, + Index: repo.NextIssueIndex(), Name: form.Title, PosterID: ctx.User.Id, Poster: ctx.User, |