Merge pull request #3970 from ulferts/fix/unclear_bulk_operation_error_message

update error message for bulk operations across multiple projects
pull/3980/head
Oliver Günther 9 years ago
commit 515b70649c
  1. 9
      app/controllers/application_controller.rb
  2. 9
      app/controllers/work_packages/moves_controller.rb
  3. 3
      config/locales/en.yml

@ -396,15 +396,6 @@ class ApplicationController < ActionController::Base
render_404
end
# Check if project is unique before bulk operations
def check_project_uniqueness
unless @project
# TODO: let users bulk edit/move/destroy issues from different projects
render_error 'Can not bulk edit/move/destroy issues from different projects'
return false
end
end
# Make sure that the user is a member of the project (or admin) if project is private
# used as a before_filter for actions that do not require any particular permission
# on the project.

@ -99,6 +99,15 @@ class WorkPackages::MovesController < ApplicationController
private
# Check if project is unique before bulk operations
def check_project_uniqueness
unless @project
# TODO: let users bulk move/copy work packages from different projects
render_error I18n.t('work_packages.move.unsupported_for_multiple_projects')
return false
end
end
def prepare_for_work_package_move
@work_packages = @work_packages.sort
@copy = params.has_key? :copy

@ -142,6 +142,9 @@ en:
no_results_title_text: There are currently no workflows.
work_packages:
move:
unsupported_for_multiple_projects: 'Bulk move/copy is not supported for work packages from multiple projects'
list_simple:
assigned:
no_results_title_text: There are currently no work packages assigned to me.

Loading…
Cancel
Save