Conversation
There was a problem hiding this comment.
Pull request overview
This pull request makes accountability results searchable by changing the resource configuration from searchable = false to searchable = true and adding publish/unpublish hooks to manage search indexes. It also includes a data migration to reindex existing results.
Changes:
- Enables search functionality for accountability results by setting the resource as searchable
- Adds component lifecycle hooks to update/remove search indexes when components are published/unpublished
- Includes a data migration to reindex all existing accountability results
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| decidim-accountability/lib/decidim/accountability/component.rb | Adds publish/unpublish hooks for search indexing and changes searchable flag to true |
| decidim-accountability/db/data/20260113140600_reindex_results.rb | Data migration to reindex existing results by triggering publish hooks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Wouldn't this make the PR a |
greenwoodt
left a comment
There was a problem hiding this comment.
I'm happy with the implementation.
I guess this is one of those PR's where its a fine line between a fix or a feature to an issue. On a second glance I am gravitating towards more of a feature than a bug.
Created a failing test with the changes in decidim-accountability/spec/lib/decidim/accountability/component_spec.rb and works fantastic.
LGTM
🎩 What? Why?
While working on #15834 i have noticed that the Accountability component registers the
resultresource, which states that the result should not be searchable. Browsing the Result model, i have seen it includesDecidim::Searchableconcern which created a contradiction.Asking the @decidim/product about the behavior, they confirmed that results should be filterable. This PR does just that.
Testing
Resultoption in the left menu📷 Screenshots
Nightly without feature
Dev - having the feature