Skip to content

Add Taxonomies to open data file#13846

Merged
alecslupu merged 6 commits intodevelopfrom
feature/open-data-taxonomies
Jan 15, 2025
Merged

Add Taxonomies to open data file#13846
alecslupu merged 6 commits intodevelopfrom
feature/open-data-taxonomies

Conversation

@andreslucena
Copy link
Copy Markdown
Member

🎩 What? Why?

This PR adds the Taxonomies to the Open Data files.

📌 Related Issues

Testing

  1. Go to http://localhost:3000/open-data
  2. See that you have information about the taxonomies
  3. Click in the zip file, open it, see that you have the taxonomies there

♥️ Thank you!

github-actions[bot]
github-actions bot previously approved these changes Jan 13, 2025
github-actions[bot]
github-actions bot previously approved these changes Jan 13, 2025
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While trying this PR i have noticed the following error. If this error gets fixed, this PR can get merged:

NoMethodError (undefined method `manifest' for an instance of Decidim::CoreDataManifest):
20:00:53 sidekiq.1     | /home/alecslupu/Sites/decidim/redesign/decidim-core/app/services/decidim/open_data_exporter.rb:72:in `data_for_resource'
20:00:53 sidekiq.1     | /home/alecslupu/Sites/decidim/redesign/decidim-core/app/services/decidim/open_data_exporter.rb:34:in `export'
20:00:53 sidekiq.1     | /home/alecslupu/Sites/decidim/redesign/decidim-core/app/jobs/decidim/open_data_job.rb:11:in `perform'
20:00:53 sidekiq.1     | /home/alecslupu/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/activejob-7.0.8.4/lib/active_job/execution.rb:65:in `block in _perform_job'

Applying this patch fixes the error:

diff --git a/decidim-core/app/services/decidim/open_data_exporter.rb b/decidim-core/app/services/decidim/open_data_exporter.rb
index 6dad5d9d33..86c2186dc8 100644
--- a/decidim-core/app/services/decidim/open_data_exporter.rb
+++ b/decidim-core/app/services/decidim/open_data_exporter.rb
@@ -69,7 +69,7 @@ module Decidim
       export_manifest = (core_data_manifests + open_data_component_manifests + open_data_participatory_space_manifests)
                         .select { |manifest| manifest.name == resource.to_sym }.first
 
-      case export_manifest.manifest
+      case export_manifest.respond_to?(:manifest) && export_manifest.manifest
       when Decidim::ComponentManifest
         data_for_component(export_manifest).read
       when Decidim::ParticipatorySpaceManifest

@andreslucena
Copy link
Copy Markdown
Member Author

While trying this PR i have noticed the following error. If this error gets fixed, this PR can get merged:

Done at cd8e196

I also fixed a warning that I've seen in the logs and CI (Scoped order is ignored, it's forced to be batch order) at 7a58a7a

Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alecslupu alecslupu merged commit 7fd9478 into develop Jan 15, 2025
@alecslupu alecslupu deleted the feature/open-data-taxonomies branch January 15, 2025 10:56
rsdeus pushed a commit to octree-gva/decidim that referenced this pull request Jan 15, 2025
antopalidi pushed a commit to openpoke/decidim that referenced this pull request Feb 12, 2025
andreslucena added a commit that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants