Commit 57fd8151 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch...

Merge branch '296976-the-open-list-in-boards-with-swimlanes-applied-is-mislabeled-as-backlog' into 'master'

Rename Backlog list to Open for Swimlanes

See merge request gitlab-org/gitlab!51539
parents 0e126969 2be89e25
import { sortBy } from 'lodash';
import { __ } from '~/locale';
import { ListType } from './constants';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
......@@ -8,14 +9,15 @@ export function getMilestone() {
export function updateListPosition(listObj) {
const { listType } = listObj;
let { position } = listObj;
let { position, title } = listObj;
if (listType === ListType.closed) {
position = Infinity;
} else if (listType === ListType.backlog) {
position = -Infinity;
title = __('Open');
}
return { ...listObj, position };
return { ...listObj, title, position };
}
export function formatBoardLists(lists) {
......
......@@ -12,6 +12,7 @@ import {
fullBoardId,
formatListsPageInfo,
formatIssue,
updateListPosition,
} from '../boards_util';
import createFlash from '~/flash';
import { __ } from '~/locale';
......@@ -131,7 +132,7 @@ export default {
},
addList: ({ commit }, list) => {
commit(types.RECEIVE_ADD_LIST_SUCCESS, list);
commit(types.RECEIVE_ADD_LIST_SUCCESS, updateListPosition(list));
},
fetchLabels: ({ state, commit }, searchTerm) => {
......
---
title: Rename Backlog list to Open for Swimlanes
merge_request: 51539
author:
type: fixed
......@@ -8,7 +8,7 @@ RSpec.describe 'epics swimlanes', :js do
let_it_be(:project) { create(:project, :public, group: group) }
let_it_be(:board) { create(:board, project: project) }
let_it_be(:label) { create(:label, project: project, name: 'Label 1') }
let_it_be(:label) { create(:label, project: project, name: 'Label1') }
let_it_be(:list) { create(:list, board: board, label: label, position: 0) }
let_it_be(:issue1) { create(:issue, project: project, labels: [label]) }
......@@ -40,6 +40,18 @@ RSpec.describe 'epics swimlanes', :js do
expect(page.find('span[data-testid="issues-lane-issue-count"]')).to have_content('1')
end
end
it 'displays default lists and a label list' do
lists = %w[Open Label1 Closed]
wait_for_requests
expect(page).to have_selector('.board-header', count: 3)
page.all('.board-header').each_with_index do |list, i|
expect(list.find('.board-title')).to have_content(lists[i])
end
end
end
before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment