summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-03-23 08:22:26 +0100
committerJarka Kadlecova <jarka@gitlab.com>2017-03-23 08:22:34 +0100
commit7d7cd914d35b9d9df29edf424771565870b787ad (patch)
tree7ddf01a9df4a1fba7ead57858ee13ee3b6190b47
parent5f7292687a29fe13bdee2c1cde808d6d2158fe45 (diff)
downloadgitlab-ce-7d7cd914d35b9d9df29edf424771565870b787ad.tar.gz
Display all closed issues in “done” board list
-rw-r--r--app/services/boards/issues/list_service.rb2
-rw-r--r--changelogs/unreleased/24215-closed-issues-board.yml4
-rw-r--r--spec/services/boards/issues/list_service_spec.rb3
3 files changed, 7 insertions, 2 deletions
diff --git a/app/services/boards/issues/list_service.rb b/app/services/boards/issues/list_service.rb
index 83f51947bd4..cb6d30396ec 100644
--- a/app/services/boards/issues/list_service.rb
+++ b/app/services/boards/issues/list_service.rb
@@ -3,7 +3,7 @@ module Boards
class ListService < BaseService
def execute
issues = IssuesFinder.new(current_user, filter_params).execute
- issues = without_board_labels(issues) unless movable_list?
+ issues = without_board_labels(issues) unless list
issues = with_list_label(issues) if movable_list?
issues.order_by_position_and_priority
end
diff --git a/changelogs/unreleased/24215-closed-issues-board.yml b/changelogs/unreleased/24215-closed-issues-board.yml
new file mode 100644
index 00000000000..678ec34b274
--- /dev/null
+++ b/changelogs/unreleased/24215-closed-issues-board.yml
@@ -0,0 +1,4 @@
+---
+title: Display all closed issues in “done” board list
+merge_request:
+author:
diff --git a/spec/services/boards/issues/list_service_spec.rb b/spec/services/boards/issues/list_service_spec.rb
index 22115c6566d..d841bdaa292 100644
--- a/spec/services/boards/issues/list_service_spec.rb
+++ b/spec/services/boards/issues/list_service_spec.rb
@@ -30,6 +30,7 @@ describe Boards::Issues::ListService, services: true do
let!(:closed_issue2) { create(:labeled_issue, :closed, project: project, labels: [p3]) }
let!(:closed_issue3) { create(:issue, :closed, project: project) }
let!(:closed_issue4) { create(:labeled_issue, :closed, project: project, labels: [p1]) }
+ let!(:closed_issue5) { create(:labeled_issue, :closed, project: project, labels: [development]) }
before do
project.team << [user, :developer]
@@ -57,7 +58,7 @@ describe Boards::Issues::ListService, services: true do
issues = described_class.new(project, user, params).execute
- expect(issues).to eq [closed_issue4, closed_issue2, closed_issue3, closed_issue1]
+ expect(issues).to eq [closed_issue4, closed_issue2, closed_issue5, closed_issue3, closed_issue1]
end
it 'returns opened issues that have label list applied when listing issues from a label list' do