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

Use to_hours, not DurationConverter

Oliver Güntherafde7c165fcb
diff --git a/modules/meeting/app/models/meeting/chronic_duration.rb b/modules/meeting/app/models/meeting/chronic_duration.rb
index a9dafc11afb..b48a2f186cc 100644
--- a/modules/meeting/app/models/meeting/chronic_duration.rb
+++ b/modules/meeting/app/models/meeting/chronic_duration.rb
@@ -28,10 +28,10 @@
module Meeting::ChronicDuration
def duration=(value)
- if value.is_a?(Numeric)
- super
+ if value.is_a?(String)
+ write_attribute(:duration, value.to_hours)
else
- write_attribute(:duration, DurationConverter.parse(value))
+ super
end
end