248 Commits

Author SHA1 Message Date
David F 3897c25139 Move autocomplete_options from FilterComponent to filter classes. wp/74380
As per review feedback from oliverguenther.
2026-05-26 08:14:56 +02:00
Klaus Zanders 6af370f01e Use special customized_type instead of model name for query (support STI models) 2026-05-08 09:27:58 +02:00
Ivan Kuchin 7756f44acc fix multiple equality, non equality filters 2026-05-05 20:33:25 +02:00
Wieland Lindenthal 7606b876d7 Support multi-substring search in project selector (#22840)
* Support multi-substring search in project selector

* Use TypeaheadFilter with ** operator for project selector search

Separate the ~ (contains) and ** (everywhere/typeahead) operator paths
in NameFilter: ~ keeps single-substring LIKE behavior for explicit
user-facing filters; ** now splits on whitespace and ANDs all tokens,
enabling multi-term search.

Switch SearchableProjectListService from ['name', '~', ...] to
['typeahead', '**', ...] so the project selector routes through
TypeaheadFilter, which inherits the multi-term ** behavior automatically.

* harden the feature spec to also check that the filter still excludes
2026-04-22 17:23:51 +02:00
Jan Sandbrink f9d8bc6614 Introduce SubclassResponsibility error
This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.

This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported

Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:

> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]

Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
2026-03-27 08:14:56 +01:00
Ivan Kuchin b2691c4d2f custom comment column in project list 2026-02-25 16:00:19 +01:00
Tobias Dillmann 379d7e2673 [#68702] Project user filter also includes groups and placeholder users
[#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
2026-01-14 14:05:07 +01:00
Dombi Attila 97be3be7c7 Address rubocop comments 2025-12-15 16:10:27 +02:00
Dombi Attila e0d63f12b9 [#69686] n+1 queries on custom field selects for projects
https://community.openproject.org/work_packages/69686
2025-12-15 15:58:13 +02:00
Jan Sandbrink 2047cc3480 Merge pull request #20308 from opf/filter-project-updated-at
Allow filtering projects by updated_at
2025-09-18 08:11:42 +02:00
ulferts 1b87e3aea6 remove strategy not applicable for the limited values of types 2025-09-17 12:05:48 +02:00
Jan Sandbrink 9109ab21bb Allow non-admins to see/filter created_at of a project
This is consistent with what we expose via the API, where we never tried
to hide this data. It was effectively only hidden from the UI.

We couldn't come up with a reason why it was hidden from the UI back then,
but since we now needed to expose updated_at to everyone (previous commit),
it only made sense to consistently also allow created_at to be seen by everyone.
2025-09-16 16:53:06 +02:00
Jan Sandbrink 735d7b8738 Allow using updated_at in project filters, selects and orders
The main motivation to add this was to allow filtering by it via API.
Though consistently, we've now enabled it to be usable from the UI as well,
where updated_at is now available as a column and for filtering and ordering.
2025-09-16 15:16:27 +02:00
ulferts 280127117f support existing storied queries and clients by allowing favored filter 2025-09-12 14:55:31 +02:00
Alexander Brandon Coles 2b144e8542 Fix wording: Change "Favored" to "Favorited"
Favorite is the correct term in the context of expressing a preference
for a particular project / other OpenProject domain object.

Updates `ActsAsFavorable` to `ActsAsFavoritable`, as well as filenames,
identifiers and strings to:

    favored => favorited
    favorable => favoritable
    favoring => favoriting
2025-09-10 19:08:15 +01:00
Tobias Dillmann acbae269a1 [#64351] Display calculated values in the project list
Co-authored-by: Ivan Kuchin <i.kuchin@openproject.com>
2025-08-12 10:22:38 +02:00
Alexander Brandon Coles d17da65477 Freeze string literals in app/models
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/models
2025-07-22 18:26:13 +01:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Ivan Kuchin bf556f4f30 remove stages_and_gates usage from production code 2025-06-20 12:34:59 +02:00
ulferts b15f28f124 clarify boundary of week filter 2025-06-12 08:53:07 +02:00
Alexander Brandon Coles afbc9ebf36 Clean up duplicate code in ProjectStatusHelper 2025-05-02 00:43:46 +01:00
ulferts 005d93b157 rename end_date/end_gate to finish_date/finish_gate 2025-04-01 16:38:52 +02:00
ulferts 78c768bd0f switch icons for phases&gates 2025-04-01 16:41:44 +03:00
ulferts e77c21dc72 adapt select and order for project phase 2025-04-01 16:39:42 +03:00
ulferts 1b197c2672 rework filters to changed phase structure 2025-04-01 16:39:41 +03:00
ulferts fe08690e34 rename stages and gates in seeder - not adding gates to phases yet 2025-04-01 16:39:38 +03:00
ulferts 464e97499c rename steps and step definitions 2025-04-01 16:39:37 +03:00
Jan Sandbrink 112ae02926 Update Ruby copyright headers using rake task
This effectively removes the year from a bunch of copyright headers.
We stopped indicating a specific year at some point, but
didn't propagate this change to every file yet.
2025-03-18 14:23:54 +01:00
Dombi Attila ee1b0beaa6 Fix typo 2025-03-06 09:23:19 +02:00
ulferts af91ca33f5 rename any filter to match rest of lifecylce filters 2025-03-03 13:26:48 +01:00
ulferts b53742e172 add none operator 2025-03-03 13:26:45 +01:00
ulferts bd7846f822 Stage and Gate specific filter 2025-03-03 13:26:44 +01:00
ulferts fa755cb258 use delegation 2025-03-03 13:26:42 +01:00
ulferts be400da0e3 ensure null values are not returned 2025-03-03 13:26:37 +01:00
ulferts c1e84620c0 use less conflicting namespace 2025-03-03 13:26:36 +01:00
ulferts 0b79bf44e2 turn this_week setting aware 2025-03-03 13:26:34 +01:00
ulferts dc856279f1 extract beginning_of_week calculation into OpenProject::I18n 2025-03-03 13:26:33 +01:00
ulferts d018755e5f check permission per project in filter 2025-03-03 13:26:32 +01:00
ulferts 8e5f0199e2 check active state in the filter 2025-03-03 13:26:31 +01:00
ulferts 15423e8300 introduce this week operator on AnyStageOrGateFilter 2025-03-03 13:26:30 +01:00
ulferts 57cbb77228 introduce between operator on AnyStageOrGateFilter 2025-03-03 13:26:29 +01:00
ulferts 194bd5c940 introduce today operator on AnyStageOrGateFilter 2025-03-03 13:26:28 +01:00
ulferts a834a49589 add lifecycle filter with on operator 2025-03-03 13:26:26 +01:00
Oliver Günther e27db03fb0 Ensure existing keys have translations 2025-02-25 10:47:21 +01:00
Tobias Dillmann b139ebff6e [#59184] improve subquery for filtering for permitted users 2025-01-13 08:28:16 +01:00
Tobias Dillmann 58ad342c8b [#59184] check feature flag before ordering life cycles 2025-01-13 08:28:16 +01:00
Tobias Dillmann 173a52053f [#59184] consider view-permission in #available? 2025-01-13 08:28:16 +01:00
Tobias Dillmann 114eb9dfcb [#59184] optimize SQL query for large arrays 2025-01-13 08:28:15 +01:00
Tobias Dillmann f24bb443ff [#59184] check view-permission when ordering 2025-01-13 08:28:15 +01:00
Tobias Dillmann 659676b1fd [#59184] simplify subquery
This is so much better
2025-01-13 08:28:14 +01:00