178 Commits

Author SHA1 Message Date
Ivan Kuchin 7756f44acc fix multiple equality, non equality filters 2026-05-05 20:33:25 +02:00
Ivan Kuchin b2691c4d2f custom comment column in project list 2026-02-25 16:00:19 +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
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
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 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
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
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Ivan Kuchin ede5e5be14 remove stages_and_gates usage from specs 2025-06-20 12:35:00 +02:00
ulferts e5f977afe0 rename stage to phase in specs 2025-06-12 08:53:08 +02:00
ulferts b15f28f124 clarify boundary of week filter 2025-06-12 08:53:07 +02:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
ulferts 005d93b157 rename end_date/end_gate to finish_date/finish_gate 2025-04-01 16:38:52 +02:00
ulferts 525139e970 use traits for phase_definition factory 2025-04-01 16:41:46 +03:00
ulferts 03ee3aa2a6 adapt specs for phase order 2025-04-01 16:39:43 +03:00
ulferts e77c21dc72 adapt select and order for project phase 2025-04-01 16:39:42 +03:00
ulferts abd0041170 adapt spec expectation 2025-04-01 16:39:41 +03:00
ulferts 1b197c2672 rework filters to changed phase structure 2025-04-01 16:39:41 +03:00
ulferts e3ee5bb552 broad rename to phase 2025-04-01 16:39:39 +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
Dombi Attila 43cd70d3aa Fix project query result life cycle any spec. 2025-03-06 15:04:40 +02:00
ulferts ede8060072 have specs work with definition_id 2025-03-03 13:26:50 +01: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 8becf6e4fa add frozen_string_literal 2025-03-03 13:26:40 +01:00
ulferts 74e302a422 adapt spec expectation 2025-03-03 13:26:39 +01:00
ulferts be400da0e3 ensure null values are not returned 2025-03-03 13:26:37 +01:00
ulferts 0b79bf44e2 turn this_week setting aware 2025-03-03 13:26:34 +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 e571ec9d25 Allow passing in human_name always
The way the :name property is derived fails
2025-02-25 10:47:21 +01:00
Oliver Günther e27db03fb0 Ensure existing keys have translations 2025-02-25 10:47:21 +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 f5d6c3f85f [#59184] simplify the regexp for the ordering key
There is no need to filter for available definitions before ordering,
this also gets rid of a Brakeman warning.
2025-01-13 08:28:12 +01:00
Tobias Dillmann 7ccf69eb09 [#59184] first specs 2025-01-13 08:28:09 +01:00
Ivan Kuchin 526d287ad4 order empty values before present values for all custom field formats 2024-11-12 12:42:36 +01:00