Commit b6c1bec5 authored by Simon Knox's avatar Simon Knox

Fix Scoped Boards bug filtering by No Milestone

parent ae2f45b6
......@@ -19,7 +19,7 @@ class BoardsStoreEE {
if (this.$boardApp) {
this.store.boardConfig = {
milestoneId: parseInt(this.$boardApp.dataset.boardMilestoneId, 10),
milestoneTitle: this.$boardApp.dataset.boardMilestoneTitle,
milestoneTitle: this.$boardApp.dataset.boardMilestoneTitle || '',
assigneeUsername: this.$boardApp.dataset.boardAssigneeUsername,
labels: JSON.parse(this.$boardApp.dataset.labels || []),
weight: parseInt(this.$boardApp.dataset.boardWeight, 10),
......@@ -42,9 +42,11 @@ class BoardsStoreEE {
let milestoneTitle = this.store.boardConfig.milestoneTitle;
if (this.store.boardConfig.milestoneId === 0) {
milestoneTitle = 'No+Milestone';
} else {
milestoneTitle = encodeURIComponent(milestoneTitle);
}
if (milestoneTitle) {
updateFilterPath('milestone_title', encodeURIComponent(milestoneTitle));
updateFilterPath('milestone_title', milestoneTitle);
this.store.cantEdit.push('milestone');
}
......
---
title: Fix Scoped Boards bug filtering by No Milestone
merge_request:
author:
type: fixed
......@@ -46,7 +46,14 @@ describe 'Scoped issue boards', :js do
expect(page).to have_selector('.card', count: 1)
end
it 'creates board to filtering by Any Milestone' do
it 'creates board filtering by No Milestone' do
create_board_milestone('No Milestone')
expect(find('.tokens-container')).to have_content("")
expect(page).to have_selector('.card', count: 2)
end
it 'creates board filtering by Any Milestone' do
create_board_milestone('Any Milestone')
expect(find('.tokens-container')).to have_content("")
......
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