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
avoid repetition of a method
ulfertsee6ba98c261f
diff --git a/lib/api/v3/work_packages/timestamped_representer.rb b/lib/api/v3/work_packages/timestamped_representer.rbindex 40898da4d97..e77edb6ddb0 100644--- a/lib/api/v3/work_packages/timestamped_representer.rb+++ b/lib/api/v3/work_packages/timestamped_representer.rb@@ -68,6 +68,10 @@ module API::V3::WorkPackagesembedded: true,uncacheable: true,exec_context: :decorator++ def timestamps_active?+ timestamps.any?(&:historic?)+ endendendenddiff --git a/lib/api/v3/work_packages/work_package_deleted_representer.rb b/lib/api/v3/work_packages/work_package_deleted_representer.rbindex 3c605b8c799..3c4dd3a1487 100644--- a/lib/api/v3/work_packages/work_package_deleted_representer.rb+++ b/lib/api/v3/work_packages/work_package_deleted_representer.rb@@ -52,10 +52,6 @@ module APIdef _type'WorkPackage'end-- def timestamps_active?- timestamps.any?(&:historic?)- endendendenddiff --git a/lib/api/v3/work_packages/work_package_representer.rb b/lib/api/v3/work_packages/work_package_representer.rbindex e73e2197131..5147c0e1d05 100644--- a/lib/api/v3/work_packages/work_package_representer.rb+++ b/lib/api/v3/work_packages/work_package_representer.rb@@ -635,10 +635,6 @@ module API@ordered_custom_actions ||= represented.custom_actions(current_user).to_a.sort_by(&:position)end- def timestamps_active?- timestamps.any?(&:historic?)- end-# Attachments need to be eager loaded for the descriptionself.to_eager_load = %i[parenttype