Skip to content

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

fix touching the project on archiving/unarchiving (#9187)

ulferts9ba51e7db016
diff --git a/app/services/projects/archive_service.rb b/app/services/projects/archive_service.rb
index b31645729b9..9353da92c68 100644
--- a/app/services/projects/archive_service.rb
+++ b/app/services/projects/archive_service.rb
@@ -48,8 +48,8 @@ module Projects
end
def archive_project(project)
- # we do not care for validations
- project.update_column(:active, false)
+ # We do not care for validations but want the timestamps to be updated
+ project.update_attribute(:active, false)
end
end
end
diff --git a/app/services/projects/unarchive_service.rb b/app/services/projects/unarchive_service.rb
index 27d795a5b4c..76544470a48 100644
--- a/app/services/projects/unarchive_service.rb
+++ b/app/services/projects/unarchive_service.rb
@@ -46,8 +46,8 @@ module Projects
end
def activate_project(project)
- # we do not care for validations
- project.update_column(:active, true)
+ # We do not care for validations but want the timestamps to be updated
+ project.update_attribute(:active, true)
end
end
end