aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-03 03:49:50 -0400
committerUnknwon <u@gogs.io>2015-09-03 03:49:50 -0400
commit2a2a8cd619c5c11300d0dc6d800dfe609ba03a14 (patch)
tree2004c24cef6e4c91349609985cb5ba30732407de /routers
parent5c5ccddb02113027f0b1a24e836ee61eebd56729 (diff)
downloadgitea-2a2a8cd619c5c11300d0dc6d800dfe609ba03a14.tar.gz
gitea-2a2a8cd619c5c11300d0dc6d800dfe609ba03a14.zip
ui and pulls index fix
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go2
-rw-r--r--routers/repo/pull.go2
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,