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
add WorkPackagesFilterHelper#project_work_packages_with_ids_path as is currently more difficult to add filtering by role
Ivan Kuchin4281242828d0
diff --git a/app/helpers/work_packages_filter_helper.rb b/app/helpers/work_packages_filter_helper.rbindex 20fa93fb6bc..3f89e32a8f8 100644--- a/app/helpers/work_packages_filter_helper.rb+++ b/app/helpers/work_packages_filter_helper.rb@@ -68,6 +68,16 @@ module WorkPackagesFilterHelperproject_work_packages_with_query_path(project, query, options)end+ def project_work_packages_with_ids_path(ids, project, options = {})+ query = {+ f: [+ filter_object('status_id', '*'),+ filter_object('id', '=', ids)+ ]+ }+ project_work_packages_with_query_path(project, query, options)+ end+# Links for reportsdef project_report_property_path(project, property_name, property_id, options = {})diff --git a/spec/helpers/work_packages_filter_helper_spec.rb b/spec/helpers/work_packages_filter_helper_spec.rbindex 359dca084c0..3ccad9a33f0 100644--- a/spec/helpers/work_packages_filter_helper_spec.rb+++ b/spec/helpers/work_packages_filter_helper_spec.rb@@ -114,6 +114,30 @@ RSpec.describe WorkPackagesFilterHelper doendend+ describe '#project_work_packages_with_ids_path' do+ it_behaves_like 'work package path with query_props' do+ let(:ids) { [13, 17, 42] }++ let(:expected_json) do+ {+ f: [+ {+ n: 'status',+ o: '*'+ },+ {+ n: 'id',+ o: '=',+ v: ids.map(&:to_s)+ }+ ]+ }+ end++ let(:path) { helper.project_work_packages_with_ids_path(ids, project) }+ end+ end+context 'project reports path helpers' dolet(:property_name) { 'priority' }let(:property_id) { 5 }