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
Fix rubocop issues in TimeEntryEvent
Klaus Zandersd32de5aed18e
diff --git a/modules/costs/lib/full_calendar/time_entry_event.rb b/modules/costs/lib/full_calendar/time_entry_event.rbindex 6d2be1f8fae..5d810d7a9df 100644--- a/modules/costs/lib/full_calendar/time_entry_event.rb+++ b/modules/costs/lib/full_calendar/time_entry_event.rb@@ -34,13 +34,7 @@ module FullCalendarclass << selfdef from_time_entry(time_entry)- starts_at = time_entry.start_timestamp || time_entry.spent_on- ends_at = time_entry.end_timestamp || time_entry.spent_on-- if time_entry.ongoing?- starts_at = time_entry.created_at- ends_at = Time.current- end+ starts_at, ends_at = start_and_end_time_from_time_entry(time_entry)event = new(id: time_entry.id,@@ -53,6 +47,17 @@ module FullCalendareventend++ def start_and_end_time_from_time_entry(time_entry)+ if time_entry.ongoing?+ [time_entry.created_at, Time.current]+ else+ [+ time_entry.start_timestamp || time_entry.spent_on,+ time_entry.end_timestamp || time_entry.spent_on+ ]+ end+ endenddef additional_attributes # rubocop:disable Metrics/AbcSize