From fde11344931590579ab347c54706afca3c48e73f Mon Sep 17 00:00:00 2001 From: Jens Kraemer Date: Thu, 22 Sep 2016 14:14:07 +0800 Subject: [PATCH] adds an error message to be displayed when issue save is aborted due to child saving errors --- app/models/issue.rb | 1 + config/locales/de.yml | 1 + config/locales/en.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/app/models/issue.rb b/app/models/issue.rb index 4e32dce..43b43bd 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1455,6 +1455,7 @@ class Issue < ActiveRecord::Base # Change project and keep project child.send :project=, project, true unless child.save + errors.add :base, :move_of_child_not_possible raise ActiveRecord::Rollback end end diff --git a/config/locales/de.yml b/config/locales/de.yml index 5bdb484..6b959d7 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -146,6 +146,7 @@ de: circular_dependency: "Diese Beziehung würde eine zyklische Abhängigkeit erzeugen" cant_link_an_issue_with_a_descendant: "Ein Ticket kann nicht mit einer Ihrer Unteraufgaben verlinkt werden" earlier_than_minimum_start_date: "kann wegen eines Vorgängertickets nicht vor %{date} liegen" + move_of_child_not_possible: Das Ticket konnte nicht gespeichert werden, da ein oder mehrere Unteraufgaben nicht in das neue Projekt verschoben werden konnten. Bitte verschieben Sie die Unteraufgaben zunächst separat. actionview_instancetag_blank_option: Bitte auswählen diff --git a/config/locales/en.yml b/config/locales/en.yml index 56a06c7..e164cb7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -130,6 +130,7 @@ en: circular_dependency: "This relation would create a circular dependency" cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" earlier_than_minimum_start_date: "cannot be earlier than %{date} because of preceding issues" + move_of_child_not_possible: Saving the issue failed because one or more child issues could not be moved to the new project. Please move them first separately. actionview_instancetag_blank_option: Please select -- 2.1.4