Skip to content
Snippets Groups Projects
Commit f8da5eb8 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Revert "Label list shows all issues (opened or closed) with that label"

parent 8a96910c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -36,12 +36,7 @@ module Boards
end
 
def set_state
params[:state] =
case list.list_type.to_sym
when :backlog then 'opened'
when :done then 'closed'
else 'all'
end
params[:state] = list.done? ? 'closed' : 'opened'
end
 
def board_label_ids
Loading
Loading
Loading
Loading
@@ -31,9 +31,10 @@ Below is a table of the definitions used for GitLab's Issue Board.
There are three types of lists, the ones you create based on your labels, and
two default:
 
- **Backlog** (default): shows all opened issues that do not fall in one of the other lists. Always appears on the very left.
- **Done** (default): shows all closed issues that do not fall in one of the other lists. Always appears on the very right.
- Label list: a list based on a label. It shows all opened or closed issues with that label.
- **Backlog** (default): shows all issues that do not fall in one of the other lists. Always appears on the very left.
- **Done** (default): shows all closed issues. Always appears on the very right.
Label list: a list based on a label. It shows all issues with that label.
- Label list: a list based on a label. It shows all opened issues with that label.
 
![GitLab Issue Board](img/issue_board.png)
 
Loading
Loading
Loading
Loading
@@ -30,7 +30,7 @@ describe Boards::Issues::ListService, services: true do
let!(:closed_issue1) { create(:labeled_issue, :closed, project: project, labels: [bug]) }
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, development]) }
let!(:closed_issue4) { create(:labeled_issue, :closed, project: project, labels: [p1]) }
 
before do
project.team << [user, :developer]
Loading
Loading
@@ -58,15 +58,15 @@ describe Boards::Issues::ListService, services: true do
 
issues = described_class.new(project, user, params).execute
 
expect(issues).to eq [closed_issue2, closed_issue3, closed_issue1]
expect(issues).to eq [closed_issue4, closed_issue2, closed_issue3, closed_issue1]
end
 
it 'returns opened/closed issues that have label list applied when listing issues from a label list' do
it 'returns opened issues that have label list applied when listing issues from a label list' do
params = { id: list1.id }
 
issues = described_class.new(project, user, params).execute
 
expect(issues).to eq [closed_issue4, list1_issue3, list1_issue1, list1_issue2]
expect(issues).to eq [list1_issue3, list1_issue1, list1_issue2]
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment