diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-18 14:01:30 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-18 14:01:30 +0300 |
commit | 423d98d796dc21b44c890b7048763333b79a9a90 (patch) | |
tree | e3eff4618282316e324655738bda949ab2217617 /app/assets/javascripts/boards | |
parent | f390be8a5d5152f6b4ec7763fab512a1f233cf89 (diff) | |
parent | 4a129ececfd0e23fff117379782e3fd3761b74ef (diff) |
Merge branch 'issue-boards-count-not-updating' into 'master'
Only increase the page number for boards when we need to
Closes #30902
See merge request !10684
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r-- | app/assets/javascripts/boards/models/list.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js index 91e5fb2a666..f2b79a88a4a 100644 --- a/app/assets/javascripts/boards/models/list.js +++ b/app/assets/javascripts/boards/models/list.js @@ -3,6 +3,8 @@ /* global ListLabel */ import queryData from '../utils/query_data'; +const PER_PAGE = 20; + class List { constructor (obj) { this.id = obj.id; @@ -58,7 +60,9 @@ class List { nextPage () { if (this.issuesSize > this.issues.length) { - this.page += 1; + if (this.issues.length / PER_PAGE >= 1) { + this.page += 1; + } return this.getIssues(false); } @@ -145,10 +149,7 @@ class List { } updateIssueLabel(issue, listFrom, moveBeforeIid, moveAfterIid) { - gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid) - .then(() => { - listFrom.getIssues(false); - }); + gl.boardService.moveIssue(issue.id, listFrom.id, this.id, moveBeforeIid, moveAfterIid); } findIssue (id) { |