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
remove now redundant bcf dictionary from work package representer
ulfertsd2669b04add7
diff --git a/modules/bim/lib/open_project/bim/engine.rb b/modules/bim/lib/open_project/bim/engine.rbindex 9df1ca102dc..4a54b039e40 100644--- a/modules/bim/lib/open_project/bim/engine.rb+++ b/modules/bim/lib/open_project/bim/engine.rb@@ -105,23 +105,6 @@ module OpenProject::Bimextend_api_response(:v3, :work_packages, :work_package) doinclude API::Bim::Utilities::PathHelper- property :bcf,- exec_context: :decorator,- getter: ->(*) {- issue = represented.bcf_issue- bcf = {}- bcf[:viewpoints] = issue.viewpoints.map do |viewpoint|- {- id: viewpoint.snapshot.id,- file_name: viewpoint.snapshot.filename- }- end- bcf- },- if: ->(*) {- represented.bcf_issue.present?- }-link :bcfTopic,cache_if: -> { current_user_allowed_to(:view_linked_issues) } donext unless represented.bcf_issue?diff --git a/modules/bim/spec/api/v3/work_packages/work_package_representer_spec.rb b/modules/bim/spec/api/v3/work_packages/work_package_representer_spec.rbindex 3e2a53ad360..1e6151c110a 100644--- a/modules/bim/spec/api/v3/work_packages/work_package_representer_spec.rb+++ b/modules/bim/spec/api/v3/work_packages/work_package_representer_spec.rb@@ -65,19 +65,6 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter doinclude_context 'eager loaded work package representer'- describe 'with BCF issues' do- it "contains viewpoints" do- is_expected.to be_json_eql([- {- file_name: bcf_topic.viewpoints.first.attachments.first.filename,- id: bcf_topic.viewpoints.first.attachments.first.id- }- ].to_json)- .including('id')- .at_path('bcf/viewpoints/')- end- end-describe '_links' dodescribe 'bcfTopic' docontext 'if a topic is present' do