Merge pull request #748 from opf/fix/work_package_parent_errors

Fix/work package parent errors
pull/743/head
sschu 11 years ago
commit 396d505d47
  1. 1
      config/locales/de.yml
  2. 1
      config/locales/en.yml
  3. 1
      doc/CHANGELOG.md
  4. 4
      lib/open_project/nested_set/root_id_handling.rb

@ -219,6 +219,7 @@ de:
parent: parent:
cannot_be_milestone: "darf kein Meilenstein sein" cannot_be_milestone: "darf kein Meilenstein sein"
cannot_be_in_another_project: "darf nicht in einem anderen Projekt sein" cannot_be_in_another_project: "darf nicht in einem anderen Projekt sein"
not_a_valid_parent: "ist ungültig"
project_association: project_association:
identical_projects: "kann nicht von einem Projekt auf sich selbst erstellt werden" identical_projects: "kann nicht von einem Projekt auf sich selbst erstellt werden"
project_association_not_allowed: "erlaubt keine Projekt-Abhängigkeiten" project_association_not_allowed: "erlaubt keine Projekt-Abhängigkeiten"

@ -220,6 +220,7 @@ en:
parent: parent:
cannot_be_milestone: "cannot be a milestone" cannot_be_milestone: "cannot be a milestone"
cannot_be_in_another_project: "cannot be in another project" cannot_be_in_another_project: "cannot be in another project"
not_a_valid_parent: "is invaild"
user: user:
attributes: attributes:
password: password:

@ -29,6 +29,7 @@ See doc/COPYRIGHT.rdoc for more details.
# Changelog # Changelog
* `#2399` Fix: Translation missing (en and de) for not_a_valid_parent
* `#3054` Fix: Some Projects cannot be deleted * `#3054` Fix: Some Projects cannot be deleted
* `#3234` Fix: [Work package tracking] Sorting of work package statuses does not work * `#3234` Fix: [Work package tracking] Sorting of work package statuses does not work
* `#3266` Fix: [Work package tracking] % done in work package status cannot be modified * `#3266` Fix: [Work package tracking] % done in work package status cannot be modified

@ -87,7 +87,7 @@ module OpenProject::NestedSet
# Checks parent issue assignment # Checks parent issue assignment
if parent if parent
if !Setting.cross_project_work_package_relations? && parent.project_id != self.project_id if !Setting.cross_project_work_package_relations? && parent.project_id != self.project_id
errors.add :parent_id, :not_a_valid_parent errors.add :parent, :cannot_be_in_another_project
elsif !new_record? elsif !new_record?
# moving an existing issue # moving an existing issue
if parent.root_id != root_id if parent.root_id != root_id
@ -95,7 +95,7 @@ module OpenProject::NestedSet
elsif move_possible?(parent) elsif move_possible?(parent)
# move accepted inside tree # move accepted inside tree
else else
errors.add :parent_id, :not_a_valid_parent errors.add :parent, :not_a_valid_parent
end end
end end
end end

Loading…
Cancel
Save