OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Addresses feedback from @cbliard
Marcello Rochab4b50bd3f99b
diff --git a/db/migrate/20230808140921_add_derived_remaining_hours_to_work_packages.rb b/db/migrate/20230808140921_add_derived_remaining_hours_to_work_packages.rbindex 4a83882333e..793f18118fe 100644--- a/db/migrate/20230808140921_add_derived_remaining_hours_to_work_packages.rb+++ b/db/migrate/20230808140921_add_derived_remaining_hours_to_work_packages.rb@@ -35,22 +35,17 @@ class AddDerivedRemainingHoursToWorkPackages < ActiveRecord::Migration[7.0]reversible do |change|change.up do- WorkPackage.transaction do- migrate_to_derived_remaining_hours!- end+ migrate_to_derived_remaining_hours!endchange.down do- WorkPackage.transaction do- rollback_from_derived_remaining_hours!- end+ rollback_from_derived_remaining_hours!endendenddef work_packages_to_update- leaf_node_ids = WorkPackage.leaves.pluck(:id)- WorkPackage.where.not(id: leaf_node_ids)+ WorkPackage.where.not(id: WorkPackage.leaves)enddef migrate_to_derived_remaining_hours!