Implement a free text search across different attributes on views

Created on 12 February 2024, 5 months ago
Updated 15 March 2024, 3 months ago

Problem/Motivation

When using the ldap_query module, we have the awesome possibility to create views for listing and filtering LDAP data. This is amazing!
However, there's no way to have a "free text" kind of search across different attributes. When trying to add a filter, the "combine" filter from core is still there and is possible to add it to the view, but it doesn't work because it's very coupled to SQL.
Would be nice to have a filter similar to the core's "combine" filter on views to add a exposed search box for users to search across a configurable set of attributes.

Steps to reproduce

- Install the ldap_query module
- Create a query
- Create a view
- Go to "Add filter"
- There's no "combine" kind of filter compatible with the ldap_query module.

Proposed resolution

- Implement a new views filter plugin, allowing the user to select one or more attributes
- The filter will create a dedicated condition group of type OR on the query, and add all selected attributes to that group.

Remaining tasks

- Patch
- Review
- Test

User interface changes

- A new "LDAP Combine attribute search" filter is available

API changes

- None

Data model changes

- None

✨ Feature request
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain akalam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024