518 Commits

Author SHA1 Message Date
Klaus Zanders 5db7e6afaf Add specs 2026-05-29 13:56:36 +02:00
Oliver Günther 3b3791f9ec Use correct configuration for group filter on user administration
https://community.openproject.org/work_packages/74763
2026-05-20 09:18:57 +02:00
Alexander Brandon Coles fb7bcae5a8 Merge pull request #23132 from opf/merge-release/17.4-20260508082602
Merge release/17.4 into dev
2026-05-08 12:36:38 +01:00
Alexander Brandon Coles 9d4881216b Merge remote-tracking branch 'opf/dev' into HEAD
# Conflicts:
#	frontend/src/assets/sass/backlogs/_master_backlog.sass
#	modules/backlogs/config/locales/crowdin/ru.yml
#	modules/wikis/config/locales/crowdin/ru.yml
#	modules/wikis/config/locales/crowdin/uk.yml
#	modules/wikis/config/locales/crowdin/zh-CN.yml
2026-05-08 10:35:12 +02:00
Klaus Zanders e392f22e1d Allow sorting and selecting custom fields in user filters as well 2026-05-08 10:27:15 +02:00
Klaus Zanders 502400bc31 Add custom field filters to the UserQuery 2026-05-08 09:28:52 +02:00
Ivan Kuchin bd7a0cfde1 Merge pull request #22930 from opf/fix-multiple-equality-non-equailty-filters
fix multiple equality, non equality filters
2026-05-07 15:52:07 +02:00
Oliver Günther 7ae5604869 Merge pull request #23070 from opf/fix/relation-visible-scope
The performance decreased because of a combination of calls that were supposed to increase performance. 

We have a mechanism in place which automatically eager loads models needed in the element representers when a collection of them is rendered. This is to avoid N+1 queries of course. But, if eager loading is  combined with e.g., a LIMIT, which we do because we paginate, rails automatically falls back to issuing two instead of just one SQL statement. Which makes sense as otherwise LEFT JOINS might mess with the result set. 

But Rails does so in a somewhat simple fashion. It uses the first query to get the DISTINCT ids. The second is used to load the values (without a limit). But instead of removing all WHERE statements in the second SQL statement and then apply just the one for the ids, it keeps the original WHERE statement and applies the one for the ids on top. The problem with that is that the database trips on that (I didn't check the why) and uses a less than optimal query plan. 

That was the problem here as well. The first query remained reasonable quick (300ms) but the second one took 25s. 

The fix is to split the two statements by hand in the representer whenever eager loading is defined. The first query has all the filters but no eager loading and fetches the ids. The second takes the ids, and with eager loading included loads the data. Et voila, second query takes 10ms.   

That at least works for relations, work_packages and projects. But there are other representers that also seem to have custom behaviour. I'm looking into whether they can be easily adapted.
2026-05-07 15:44:13 +02:00
OpenProject Actions CI 0778811719 Merge branch 'release/17.4' into dev 2026-05-06 12:47:03 +00:00
Oliver Günther c660802146 Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-05-06 09:19:25 +02:00
Ivan Kuchin 7756f44acc fix multiple equality, non equality filters 2026-05-05 20:33:25 +02:00
Oliver Günther e40656be2b Fix shares visibility scope (#23046)
* Fix shares visibility scope

* Add missing permission on the wp_role to fix spec

* Use unscoped to prevent scope creeping into the subquery
2026-05-05 12:31:57 +02:00
Klaus Zanders 4e0634458c Introduce UserQuery model that is persisted trough PersistedQuery 2026-04-23 10:38:05 +02:00
Judith Roth d272328aeb Merge pull request #22732 from opf/feature/73761-global-search-find-work-packages-by-their-identifier
[#73761] Global search: Find work packages by their identifier
2026-04-22 15:47:15 +02:00
Judith Roth 6f3a8b0875 [#73761] Add spec for searching semantic aliases when back in classic mode 2026-04-22 14:17:30 +02:00
Judith Roth 04355e8073 [#73761] Global search: Find work packages by their identifier
https://community.openproject.org/wp/73761

- Use a search only by prefix to allow for index usage in the db
- Also search by historic identifiers
2026-04-19 21:13:39 +02:00
Oliver Günther 8fafc2593b Fix visibility scope of groups in members filters
https://community.openproject.org/work_packages/74000
2026-04-17 11:34:36 +02:00
Klaus Zanders cb149f3517 Allow filtering by group hierarchy 2026-03-18 14:25:31 +01:00
Klaus Zanders c8a96dd4e3 Merge branch 'release/17.2' into merge-release/17.1-20260226135931 2026-02-26 15:01:18 +01:00
Klaus Zanders 7742591418 Merge branch 'release/17.1' into merge-17.0-in-17.1 2026-02-26 14:36:00 +01:00
Ivan Kuchin b2691c4d2f custom comment column in project list 2026-02-25 16:00:19 +01:00
ulferts 608cc40e68 replace old visible methods on wp cf 2026-02-24 14:31:40 +01:00
Mir Bhatia 289d4263d5 Create and use InvitableToMeetingInProject filter 2026-01-28 16:00:52 +01:00
Jan Sandbrink 7f936cc6d2 Merge pull request #21646 from opf/mcp_tool_refactor
Refactor how filtering in MCP tools works
2026-01-22 16:50:06 +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
Jan Sandbrink c5783c4538 Refactor how filtering in MCP tools works
Filters are now defined declaratively during tool definition.
In addition to simple where-based filters (like the ones we've been
using in SearchProject), we now also support using query filters
that are defined for other purposes already. Though we keep supporting
custom filtering, since pre-existing classes are often not available
and necessary for very simple filtering operations.

As a side-find, specs for the ProjectStatusFilter have been extended.
2026-01-13 10:31:23 +01:00
Eric Schubert e3925d8275 [#70356] add filter specs to cover deprecated values 2026-01-12 14:21:20 +01:00
ulferts 365d3e8dc2 rename Project status to Status 2026-01-06 14:55:20 +01:00
Dombi Attila c992d6c04d Fix query mocks 2025-12-15 15:58:14 +02:00
Dombi Attila 6053cd2e7c Add custom field context spec 2025-12-15 15:58:14 +02:00
ulferts a5102536d3 stabilize flickering spec
./spec/models/queries/work_packages/filter/typeahead_filter_spec.rb:96

Since the status is now also searched in, using the id of a work package as the search string can collide with the name of the status having an incremented integer as part of the name
2025-12-12 16:21:27 +01:00
Wieland Lindenthal 7e2aad28ed [#56831] Add work package type, status and meta status to what the global search is searching on during typeahead (#20116)
* [#56831] Add work package type, status and meta status to what the global search is searching on during typeahead

https://community.openproject.org/work_packages/56831

* Add placeholder text with better instructions to the global search

* Add specs for typeahead_filter

* Improve global search placeholder
2025-11-26 19:28:07 +01:00
ulferts 7653fbf66b workspace references in representers and auxilliary endpoints 2025-11-25 16:47:59 +01:00
Dombi Attila 652551d537 [#68040] Switching a multi select list cf to a single select cf of projects breaks opening the editing modal on the overview page
https://community.openproject.org/work_packages/68040

Change the custom_value_for method signature to always use a custom field.
2025-11-12 20:25:16 +02:00
Christophe Bliard 8c7a4e30cc Fix tests dealing with Plaintext::Resolver
It's not possible to use allow_any_instance_of(Plaintext::Resolver).to
receive(:text) since we prepended a module which overrides the #text
method.

And the extra `#reload` calls and `allow(attachment).to
receive(:readable?).and_return(true)` were not needed.
2025-10-08 17:27:05 +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
Alexander Brandon Coles 7a04c85d3f Merge pull request #20224 from opf/code-maintenance/fix-acts_as_favorited-favor-favorite-wording
[#67313] Fix wording: Change "Favored" to "Favorited" (code, db)
2025-09-11 12:23:05 +01: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
ulferts 6cf1b4d2ad properly check availability of custom field filter 2025-09-09 15:01:27 +02:00
Pavel Balashou f5da66ccb7 [#66996] Hide deleted users from everywhere.
https://community.openproject.org/work_packages/66996
2025-08-29 17:05:08 +02:00
Eric Schubert c6ad2c3c8f [#66412] fixed test setup
- use new interface of persistence service
- use correct spec helper
2025-08-26 13:18:47 +02:00
Oliver Günther c3a37508b5 Implement status operator for versions, similar to work packages 2025-08-26 09:57:43 +02:00
Klaus Zanders 2ae9493164 Merge pull request #19635 from opf/feature/65783-improve-budgets-to-make-them-aggregatable
Budget improvements from BMDS Hackathon
2025-08-25 16:00:11 +02:00
Oliver Günther 328ba0a2cf Add a name filter to versions 2025-08-25 15:23:03 +02:00
Klaus Zanders de5c417277 Remove budget relations and state 2025-08-25 14:05:13 +02:00
Klaus Zanders 75ebb91cab Budget Relations & Fixed Budgets (#19543)
* Add BudgetRelation, fixed budget

* Add fixed_budget editing to budget form

* Show and allow setting the budget state

* Rename fixed_budget to supplementary_amount to make it a factor of the budget

* Add an `available` method so we don't have to calculate this all the time

* Add a section to the show budget page to display amounts

* Highlight totals

* Add tests and allocation + spent for children

* Show budget allocated to children in budget show

* Add an allocated to children column

* show children in the page

* Implement bottom->up addition approach

* remove unused DB column and make sure each budget only has one parent

* Add budget relation controller

* Remove names for budgets in specs

* Refactor tests to use `have_attributes`

* re-add appropriate names for spec factories
2025-08-25 11:28:31 +02:00
Christophe Bliard 96fed646ed [65783] Add budgets info to projects list columns
Added projects columns are:
  - Budget planned
  - Budget spent
  - Budget spent ratio
  - Budget available (remaining budget)
2025-08-25 11:28:30 +02:00
Ivan Kuchin 352547cd85 [#59079] Remove deprecated ordering versions by semver_name
https://community.openproject.org/work_packages/59079
2025-07-08 19:32:48 +02:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00