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
Adds the storable journals to the includes for eager loading the activity records.
Marcello Rocha7ed51257ea7d
diff --git a/lib/api/v3/activities/activities_by_work_package_api.rb b/lib/api/v3/activities/activities_by_work_package_api.rbindex 8a2c0a0d9c0..10a66143f6a 100644--- a/lib/api/v3/activities/activities_by_work_package_api.rb+++ b/lib/api/v3/activities/activities_by_work_package_api.rb@@ -38,6 +38,7 @@ module APIjournals = @work_package.journals.includes(:data,:customizable_journals,:attachable_journals,+ :storable_journals,:bcf_comment)Activities::ActivityCollectionRepresenter.new(journals,diff --git a/lib/api/v3/activities/activity_eager_loading_wrapper.rb b/lib/api/v3/activities/activity_eager_loading_wrapper.rbindex db1963d7d25..4c2bf913e78 100644--- a/lib/api/v3/activities/activity_eager_loading_wrapper.rb+++ b/lib/api/v3/activities/activity_eager_loading_wrapper.rb@@ -135,7 +135,7 @@ module API) AS journalsSQL)- .includes(:attachable_journals, :customizable_journals)+ .includes(:attachable_journals, :customizable_journals, :storable_journals)endendenddiff --git a/spec/requests/api/v3/activities_by_work_package_resource_spec.rb b/spec/requests/api/v3/activities_by_work_package_resource_spec.rbindex 151e552c531..11a5e81d987 100644--- a/spec/requests/api/v3/activities_by_work_package_resource_spec.rb+++ b/spec/requests/api/v3/activities_by_work_package_resource_spec.rb@@ -87,7 +87,7 @@ RSpec.describe API::V3::Activities::ActivitiesByWorkPackageAPI doinclude_context 'create activity'end- context 'with an errorenous work package' do+ context 'with an erroneous work package' dobefore dowork_package.subject = ''work_package.save!(validate: false)