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
baseline api: rubocop refactoring
Sebastian Fiedlschuster547711b7dd29
diff --git a/app/models/journable/with_historic_attributes.rb b/app/models/journable/with_historic_attributes.rbindex a8625522c31..50bc7948adf 100644--- a/app/models/journable/with_historic_attributes.rb+++ b/app/models/journable/with_historic_attributes.rb@@ -114,6 +114,7 @@ class Journable::WithHistoricAttributes < SimpleDelegatorjournableend+ # rubocop:disable Metrics/AbcSizedef self.wrap_multiple(journables, timestamps: nil, query: nil, include_only_changed_attributes: false)timestamps ||= query.try(:timestamps) || []journables = journables.first.class.at_timestamp(timestamps.last).where(id: journables) if timestamps.last.try(:historic?)@@ -129,6 +130,7 @@ class Journable::WithHistoricAttributes < SimpleDelegatorendjournablesend+ # rubocop:enable Metrics/AbcSizedef assign_historic_attributes(timestamp:, historic_journable:, matching_journable:)attributes_by_timestamp[timestamp.to_s] = extract_historic_attributes_from(historic_journable:) if historic_journablediff --git a/lib/api/v3/work_packages/work_package_representer.rb b/lib/api/v3/work_packages/work_package_representer.rbindex b38e2805826..e642d403263 100644--- a/lib/api/v3/work_packages/work_package_representer.rb+++ b/lib/api/v3/work_packages/work_package_representer.rb@@ -480,7 +480,9 @@ module APIproperty :attributes_by_timestamp,as: :attributesByTimestamp,- if: ->(*) { respond_to?(:attributes_by_timestamp) and respond_to?(:timestamps) and timestamps != [Timestamp.now] },+ if: ->(*) {+ respond_to?(:attributes_by_timestamp) and respond_to?(:timestamps) and timestamps != [Timestamp.now]+ },getter: ->(*) dotimestamps.collect do |timestamp|attrs = attributes_by_timestamp[timestamp.to_s].to_h