Skip to content

Conversation

@EinLama
Copy link
Contributor

@EinLama EinLama commented Jan 8, 2026

Ticket

https://community.openproject.org/wp/68702

What are you trying to accomplish?

Remove the type = User restriction on the filter component, so that groups and placeholder users can also be found.

Included some minor drive-by rubocop fixes for neighboring specs.

Screenshots

image

What approach did you choose and why?

Simply removed the restriction from the base class that only matched on principals of type user. Apart from the project filter, the meetings filter is inheriting from the base class, too. Therefore, this change alters meetings filters – in theory. In practice, there is no user custom field filter for meetings, so this change has no effect on meetings.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@EinLama EinLama force-pushed the bug/68702-project-cf-of-type-user-does-not-display-groups-or-placeholder-users branch from 2960687 to a14ba9c Compare January 8, 2026 14:47
@EinLama EinLama marked this pull request as ready for review January 8, 2026 14:52
Copy link
Contributor

@dombesz dombesz left a comment

Choose a reason for hiding this comment

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

The changes look good, however filtering explicitly by a user that is the member of a group is not working correctly. Please take a look at the screenshots:

1. The group contains the Reader DEV user.

image

2. The custom field has the group assigned to it.

image

3. Filtering by the group works. ✅

image

4. Filtering by the Reader DEV user doesn't return the project.❌

image

@EinLama EinLama force-pushed the bug/68702-project-cf-of-type-user-does-not-display-groups-or-placeholder-users branch from a14ba9c to e5b6855 Compare January 13, 2026 13:06
@EinLama EinLama force-pushed the bug/68702-project-cf-of-type-user-does-not-display-groups-or-placeholder-users branch 2 times, most recently from a02ad94 to 2765af5 Compare January 14, 2026 08:41
[#68702] Clean up custom field filter spec

[#68702] Clean up Project table spec

[#68702] Add project list filter spec for groups and placeholder users

[#68702] User filter matches group membership

[#68702] Add specs for group membership filtering
@EinLama EinLama force-pushed the bug/68702-project-cf-of-type-user-does-not-display-groups-or-placeholder-users branch from 2765af5 to 2622650 Compare January 14, 2026 08:44
@EinLama EinLama changed the base branch from release/17.0 to dev January 14, 2026 08:44
@opf opf deleted a comment from github-actions bot Jan 14, 2026
@EinLama
Copy link
Contributor Author

EinLama commented Jan 14, 2026

Target branch change

Please mind, since this bugfix was moved to 17.1.0, the branch was retargeted to dev.

Group filter issue

Thank you for pointing out the flaw in the provided fix. Group filters now match on users that are members of the group - and the other way around.

I noticed that placeholder users cannot be members of a group. So for them, these rules do not apply ☝️

Specs for all of these cases were added.

Copy link
Contributor

@dombesz dombesz left a comment

Choose a reason for hiding this comment

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

Works nicely, thanks!

@EinLama EinLama merged commit 379d7e2 into dev Jan 14, 2026
25 checks passed
@EinLama EinLama deleted the bug/68702-project-cf-of-type-user-does-not-display-groups-or-placeholder-users branch January 14, 2026 13:05
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

3 participants