diff options
author | Constance Okoghenun <cokoghenun@gitlab.com> | 2018-08-07 22:29:53 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-08-07 22:29:53 +0300 |
commit | 0b3ff7267c147bb490acaef9c6054c19ced4c637 (patch) | |
tree | f32b9c9e031e914765b02640a60235d387eedfe2 /app/assets/javascripts/boards/components/board_sidebar.js | |
parent | 821f1a6496db422d339bb413874a5dac6fa112cd (diff) |
Resolve "Board label edit drop down is showing incorrect selected labels summary"
Diffstat (limited to 'app/assets/javascripts/boards/components/board_sidebar.js')
-rw-r--r-- | app/assets/javascripts/boards/components/board_sidebar.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/components/board_sidebar.js b/app/assets/javascripts/boards/components/board_sidebar.js index 371be109229..a9102743bf9 100644 --- a/app/assets/javascripts/boards/components/board_sidebar.js +++ b/app/assets/javascripts/boards/components/board_sidebar.js @@ -51,6 +51,16 @@ gl.issueBoards.BoardSidebar = Vue.extend({ canRemove() { return !this.list.preset; }, + hasLabels() { + return this.issue.labels && this.issue.labels.length; + }, + labelDropdownTitle() { + return this.hasLabels ? + `${this.issue.labels[0].title} ${this.issue.labels.length - 1}+ more` : 'Label'; + }, + selectedLabels() { + return this.hasLabels ? this.issue.labels.map(l => l.title).join(',') : ''; + } }, watch: { detail: { |