From 2a2a8cd619c5c11300d0dc6d800dfe609ba03a14 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 3 Sep 2015 03:49:50 -0400 Subject: ui and pulls index fix --- routers/repo/issue.go | 2 +- routers/repo/pull.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'routers/repo') 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, -- cgit v1.2.3