From a080aa13a86cd0bfc11c728d9999deeafaa0a5d0 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Mon, 3 Jul 2017 07:44:58 +0000 Subject: [PATCH] Resolve "Issue Board -> "Remove from board" button when viewing an issue gives js error and fails" --- .../boards/components/board_sidebar.js | 5 ++++- .../boards/components/sidebar/remove_issue.js | 3 +-- .../boards/components/_sidebar.html.haml | 3 ++- ...viewing-an-issue-gives-js-error-and-fails.yml | 4 ++++ spec/features/boards/sidebar_spec.rb | 16 ++++++++++++++++ 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 changelogs/unreleased/34097-issue-board-remove-from-board-button-when-viewing-an-issue-gives-js-error-and-fails.yml diff --git a/app/assets/javascripts/boards/components/board_sidebar.js b/app/assets/javascripts/boards/components/board_sidebar.js index c7afd4ead6b..590b7be36e3 100644 --- a/app/assets/javascripts/boards/components/board_sidebar.js +++ b/app/assets/javascripts/boards/components/board_sidebar.js @@ -34,7 +34,10 @@ gl.issueBoards.BoardSidebar = Vue.extend({ }, milestoneTitle() { return this.issue.milestone ? this.issue.milestone.title : 'No Milestone'; - } + }, + canRemove() { + return !this.list.preset; + }, }, watch: { detail: { diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.js b/app/assets/javascripts/boards/components/sidebar/remove_issue.js index 5597f128b80..6a900d4abd0 100644 --- a/app/assets/javascripts/boards/components/sidebar/remove_issue.js +++ b/app/assets/javascripts/boards/components/sidebar/remove_issue.js @@ -46,8 +46,7 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({ }, template: `
+ class="block list">