Commit 29b90ce8 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Rename feature from "issue_board_milestone" to "scoped_issue_board"

parent 2e19d8ff
......@@ -16,7 +16,7 @@ class License < ActiveRecord::Base
group_webhooks
issuable_default_templates
issue_board_focus_mode
issue_board_milestone
scoped_issue_board
issue_weights
jenkins_integration
ldap_extras
......
......@@ -218,8 +218,8 @@ class Namespace < ActiveRecord::Base
feature_available?(:multiple_issue_boards)
end
def issue_board_milestone_available?(user = nil)
feature_available?(:issue_board_milestone)
def scoped_issue_board_available?(user = nil)
feature_available?(:scoped_issue_board)
end
private
......
......@@ -1532,8 +1532,8 @@ class Project < ActiveRecord::Base
feature_available?(:multiple_issue_boards, user)
end
def issue_board_milestone_available?(user = nil)
feature_available?(:issue_board_milestone, user)
def scoped_issue_board_available?(user = nil)
feature_available?(:scoped_issue_board, user)
end
def full_path_was
......
module Boards
class UpdateService < Boards::BaseService
def execute(board)
params.delete(:milestone_id) unless parent.feature_available?(:issue_board_milestone)
params.delete(:milestone_id) unless parent.feature_available?(:scoped_issue_board)
board.update(params)
end
......
......@@ -57,7 +57,7 @@
%li
%a{ "href" => "#", "@click.stop.prevent" => "showPage('edit')" }
Edit board name
- if parent.issue_board_milestone_available?(current_user)
- if parent.scoped_issue_board_available?(current_user)
%li
%a{ "href" => "#", "@click.stop.prevent" => "showPage('milestone')" }
Edit board milestone
......
......@@ -10,7 +10,7 @@
%input.form-control{ type: "text",
id: "board-new-name",
"v-model" => "board.name" }
- if current_board_parent.issue_board_milestone_available?(current_user)
- if current_board_parent.scoped_issue_board_available?(current_user)
.dropdown.board-inner-milestone-dropdown{ ":class" => "{ open: milestoneDropdownOpen }",
"v-if" => "currentPage === 'new'" }
%label.label-light{ for: "board-milestone" }
......
......@@ -8,7 +8,7 @@ module EE
data = {
board_milestone_title: board&.milestone&.title,
focus_mode_available: parent.feature_available?(:issue_board_focus_mode).to_s,
show_promotion: (@project && show_promotions? && (!@project.feature_available?(:multiple_issue_boards) || !@project.feature_available?(:issue_board_milestone) || !@project.feature_available?(:issue_board_focus_mode))).to_s
show_promotion: (@project && show_promotions? && (!@project.feature_available?(:multiple_issue_boards) || !@project.feature_available?(:scoped_issue_board) || !@project.feature_available?(:issue_board_focus_mode))).to_s
}
......
......@@ -12,7 +12,7 @@
- unless @project.feature_available?(:multiple_issue_boards)
%li
= link_to _('Multiple issue boards'), help_page_path('user/project/issue_board.html', anchor:'use-cases-for-multiple-issue-boards'), target: '_blank'
- unless @project.feature_available?(:issue_board_milestone)
- unless @project.feature_available?(:scoped_issue_board)
%li
= link_to _('Issue boards with milestones'), help_page_path('user/project/issue_board.html', anchor:'board-with-a-milestone'), target: '_blank'
- unless @project.feature_available?(:issue_board_focus_mode)
......
......@@ -796,7 +796,7 @@ module API
expose :name
expose :project, using: Entities::BasicProjectDetails
expose :milestone,
if: -> (board, _) { board.project.feature_available?(:issue_board_milestone) }
if: -> (board, _) { board.project.feature_available?(:scoped_issue_board) }
expose :lists, using: Entities::List do |board|
board.lists.destroyable
end
......
......@@ -17,7 +17,7 @@ describe 'Board with milestone', :js do
context 'with the feature enabled' do
before do
stub_licensed_features(issue_board_milestone: true)
stub_licensed_features(scoped_issue_board: true)
end
context 'new board' do
......@@ -173,7 +173,7 @@ describe 'Board with milestone', :js do
context 'with the feature disabled' do
before do
stub_licensed_features(issue_board_milestone: false)
stub_licensed_features(scoped_issue_board: false)
visit project_boards_path(project)
end
......
......@@ -60,17 +60,17 @@ describe API::Boards do
end
end
context 'with the issue_board_milestone-feature available' do
it 'returns the milestone when the `issue_board_milestone`-feature is enabled' do
stub_licensed_features(issue_board_milestone: true)
context 'with the scoped_issue_board-feature available' do
it 'returns the milestone when the `scoped_issue_board`-feature is enabled' do
stub_licensed_features(scoped_issue_board: true)
get api(base_url, user)
expect(json_response.first["milestone"]).not_to be_nil
end
it 'hides the milestone when the `issue_board_milestone`-feature is disabled' do
stub_licensed_features(issue_board_milestone: false)
it 'hides the milestone when the `scoped_issue_board`-feature is disabled' do
stub_licensed_features(scoped_issue_board: false)
get api(base_url, user)
......
......@@ -26,7 +26,7 @@ describe Boards::UpdateService do
end
it 'udpates the milestone with issue board milestones enabled' do
stub_licensed_features(issue_board_milestone: true)
stub_licensed_features(scoped_issue_board: true)
milestone = create(:milestone, project: project)
service = described_class.new(project, double, milestone_id: milestone.id)
......@@ -36,7 +36,7 @@ describe Boards::UpdateService do
end
it 'udpates the milestone with the issue board milestones feature enabled' do
stub_licensed_features(issue_board_milestone: false)
stub_licensed_features(scoped_issue_board: false)
milestone = create(:milestone, project: project)
service = described_class.new(project, double, milestone_id: milestone.id)
......
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