# Change project and keep project
child.send :project=, project, true
unless child.save
+ errors.add :base, l(:error_move_of_child_not_possible, :child => "##{child.id}", :errors => child.errors.full_messages.join(", "))
raise ActiveRecord::Rollback
end
end
error_unable_to_connect: Fehler beim Verbinden (%{value})
error_workflow_copy_source: Bitte wählen Sie einen Quell-Tracker und eine Quell-Rolle.
error_workflow_copy_target: Bitte wählen Sie die Ziel-Tracker und -Rollen.
+ error_move_of_child_not_possible: "Unteraufgabe %{child} nicht in das neue Projekt verschoben werden konnten: %{errors}"
field_account: Konto
field_active: Aktiv
error_ldap_bind_credentials: "Invalid LDAP Account/Password"
error_no_tracker_allowed_for_new_issue_in_project: "The project doesn't have any trackers for which you can create an issue"
error_no_projects_with_tracker_allowed_for_new_issue: "There are no projects with trackers for which you can create an issue"
+ error_move_of_child_not_possible: "Subtask %{child} could not be moved to the new project: %{errors}"
mail_subject_lost_password: "Your %{value} password"
mail_body_lost_password: 'To change your password, click on the following link:'
error_ldap_bind_credentials: "Identifiant ou mot de passe LDAP incorrect"
error_no_tracker_allowed_for_new_issue_in_project: "Le projet ne dispose d'aucun tracker sur lequel vous pouvez créer une demande"
error_no_projects_with_tracker_allowed_for_new_issue: "Aucun projet ne dispose d'un tracker sur lequel vous pouvez créer une demande"
+ error_move_of_child_not_possible: "La sous-tâche %{child} n'a pas pu être déplacée dans le nouveau projet : %{errors}"
mail_subject_lost_password: "Votre mot de passe %{value}"
mail_body_lost_password: 'Pour changer votre mot de passe, cliquez sur le lien suivant :'
assert_equal 3, issue.tracker_id
end
+ def test_move_to_another_project_should_set_error_message_on_child_failure
+ parent = Issue.generate!
+ child = Issue.generate!(:parent_issue_id => parent.id, :tracker_id => 2)
+ project = Project.generate!(:tracker_ids => [1])
+
+ parent.reload
+ parent.project_id = project.id
+ assert !parent.save
+ assert_include "Subtask ##{child.id} could not be moved to the new project: Tracker is not included in the list",
+ parent.errors[:base]
+ end
+
def test_copy_to_the_same_project
issue = Issue.find(1)
copy = issue.copy