Commit 15d9430b authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'fix-rebalance-banner' into 'master'

Fix issue rebalance banner

See merge request gitlab-org/gitlab!73608
parents c31ca16b 8383b1b1
= render 'shared/alerts/positioning_disabled'
= render "shared/boards/show", board: @board, group: true
- is_project_overview = local_assigns.fetch(:is_project_overview, false)
= render 'shared/alerts/positioning_disabled'
= render 'shared/alerts/positioning_disabled' if @sort == 'relative_position'
- if Feature.enabled?(:vue_issuables_list, @project) && !is_project_overview
- data_endpoint = local_assigns.fetch(:data_endpoint, expose_path(api_v4_projects_issues_path(id: @project.id)))
......
= render 'shared/alerts/positioning_disabled'
= render 'shared/alerts/positioning_disabled' if @sort == 'relative_position'
- if @issues.to_a.any?
%ul.content-list.issues-list.issuable-list{ class: issue_manual_ordering_class, data: { group_full_path: @group&.full_path } }
......
- if issue_repositioning_disabled?
= render 'shared/alert_info', body: _('Issues manual ordering is temporarily disabled for technical reasons.')
= render 'shared/alert_info', body: _('Issues are being rebalanced at the moment, so manual reordering is disabled.')
......@@ -19291,6 +19291,9 @@ msgstr ""
msgid "Issues and merge requests"
msgstr ""
msgid "Issues are being rebalanced at the moment, so manual reordering is disabled."
msgstr ""
msgid "Issues assigned to me"
msgstr ""
......@@ -19300,9 +19303,6 @@ msgstr ""
msgid "Issues closed"
msgstr ""
msgid "Issues manual ordering is temporarily disabled for technical reasons."
msgstr ""
msgid "Issues must match this scope to appear in this list."
msgstr ""
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Issue rebalancing' do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, group: group) }
let_it_be(:user) { create(:user) }
let(:alert_message_regex) { /Issues are being rebalanced at the moment/ }
before_all do
create(:issue, project: project)
group.add_developer(user)
end
context 'when issue rebalancing is in progress' do
before do
sign_in(user)
stub_feature_flags(block_issue_repositioning: true)
end
it 'shows an alert in project boards' do
board = create(:board, project: project)
visit project_board_path(project, board)
expect(page).to have_selector('.gl-alert-info', text: alert_message_regex, count: 1)
end
it 'shows an alert in group boards' do
board = create(:board, group: group)
visit group_board_path(group, board)
expect(page).to have_selector('.gl-alert-info', text: alert_message_regex, count: 1)
end
it 'shows an alert in project issues list with manual sort' do
visit project_issues_path(project, sort: 'relative_position')
expect(page).to have_selector('.gl-alert-info', text: alert_message_regex, count: 1)
end
it 'shows an alert in group issues list with manual sort' do
visit issues_group_path(group, sort: 'relative_position')
expect(page).to have_selector('.gl-alert-info', text: alert_message_regex, count: 1)
end
it 'does not show an alert in project issues list with other sorts' do
visit project_issues_path(project, sort: 'created_date')
expect(page).not_to have_selector('.gl-alert-info', text: alert_message_regex)
end
it 'does not show an alert in group issues list with other sorts' do
visit issues_group_path(group, sort: 'created_date')
expect(page).not_to have_selector('.gl-alert-info', text: alert_message_regex)
end
end
end
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