55 Commits

Author SHA1 Message Date
Oliver Günther 4cc9faef4f Consistently use OpenProject::SqlSanitization instead of forwarding to sanitize_sql_array 2026-05-27 10:08:16 +02:00
Oliver Günther 4724150e3d Avoid quote_string in favor of bindings where possible 2026-05-27 10:08:16 +02:00
Judith Roth 2f89982db8 [#73761] Use lower LIKE comparison to allow btree usage 2026-04-22 09:58:44 +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
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
Oliver Günther c3a37508b5 Implement status operator for versions, similar to work packages 2025-08-26 09:57:43 +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
ulferts c1e84620c0 use less conflicting namespace 2025-03-03 13:26:36 +01:00
ulferts dc856279f1 extract beginning_of_week calculation into OpenProject::I18n 2025-03-03 13:26:33 +01:00
ulferts 15423e8300 introduce this week operator on AnyStageOrGateFilter 2025-03-03 13:26:30 +01:00
Bruno Pagno 130f0c4f8b Implement hierarchy filter with descendants 2024-11-26 15:38:59 +01:00
Ivan Kuchin 7d9d523b61 add tests and compact logic 2024-11-05 20:36:53 +01:00
Ivan Kuchin 12d6bc034e check that dates are in range acceptable by PostgreSQL 2024-11-04 20:05:52 +01:00
Ivan Kuchin 199f3c1d25 cleanup a bit date related operators code 2024-11-04 20:04:45 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Klaus Zanders 1660fce6ef Manage some leftover copyright noticesthat still mention 2023 2024-07-03 08:42:09 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Richard "Virgo" Richter 77b84f6b89 Fix for multi-value CF "is (AND)" and "is not" filtering 2024-02-29 18:35:06 +00:00
Oliver Günther 7078114d9a Avoid treating underscores as ilike input
https://community.openproject.org/work_packages/33574
2024-01-22 09:58:30 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
ulferts a51aee48d6 fix i18n reference 2023-12-11 11:46:33 +01:00
Eric Schubert 31f4e42d97 [#50910] switched share_with_user strategy equals_all to global 2023-11-22 15:03:57 +01:00
Eric Schubert 259f3e7bb2 [#50910] replaced operator * with &= for user action 'all' 2023-11-22 15:01:48 +01:00
Aaron Contreras b124607aed Chore: Rename SharedUser to SharedWithUser 2023-09-19 16:41:31 -05:00
Aaron Contreras 2f10b1f156 Delete none operator 2023-09-19 16:21:47 -05:00
Aaron Contreras 3596d65366 Add EqualsAll operator for Shared users 2023-09-19 16:04:44 -05:00
Aaron Contreras f804b9c5f9 Create shared_user_list_optional filter strategy
Builds a new filter strategy together with an extended set of operators
used specifically for this filters. It consists of a classic
"list_optional" filter strategy with a couple of modifications.

1. We reset the "=" symbol back to an "Equals"
1. We override the "*" symbol to use the new custom "Any" operator
2. We override the "!*" symbol to use the new custom "None" operator
2023-09-14 14:39:19 -05:00
Oliver Günther bd37957412 Add not equals all filter for "is not" operator for CF list
https://community.openproject.org/projects/openproject/work_packages/46169
2023-02-09 15:56:08 +01:00
Oliver Günther 52db7a7f8c Add customized operator that allows subselect on custom_values (#12041)
* Add customized operator that allows subselect on custom_values

* Override operators and labels for list values and change defaults

* Improve class check for determining operator

* Add spec for is (AND) operator

* Adapt specs to renamed operators

* Add operator to doc
2023-02-08 11:04:43 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
ulferts 336fd850a4 support the child operator properly 2022-11-30 10:42:10 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts f8b28b300c treat nil value as non false
The default BooleanEquals filter treats null same as false. Because of that, notifications that are not meant for ian were displayed. The BooleanEqualsStrict filter only filters for false as expected so that the notifications are not displayed.
2021-06-28 20:18:57 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
ulferts e5749d9817 order independent contains operator (#8315)
* order independent contains operator

This for example affects the search which relies on the subject filter with the contains operator being active.

* remove legacy query spec

The query is generally covered rather well in the new specs.

[ci skip]
2020-04-28 08:40:50 +02:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 5edb64b2df use default filter behaviour for wps available for relations
That way, we can treat the end point as just another wp endpoint with
filter capabilities. Currently, there is a couple of custom logic still
present but that is only due to wanting to not break the public API.

In the long run, the whole end point could be removed as the same
filtering is now available using /api/v3/work_packages with an
appropriate filter.
2019-06-04 13:51:36 +02:00
Oliver Günther b81b5c3e3c [29832] Split whitespace in like query
https://community.openproject.com/wp/29832
2019-04-09 15:01:15 +02:00
Oliver Günther 8ab4f2a663 Boards module (#7008)
* Hack spike to show D&D use case

[ci skip]

* Add ordered work packages

* Save order on existing work packages

* Boards WIP

* CDK drag

* Add dragula handler

[ci skip]

* Add filter to return all manual sorted work packages

* Print icon on hover

* Boards routing and list components

* Better loading indicator on list with streaming result

[ci skip]

* Add new board and list buttons

[ci skip]

* Post new query

[ci skip]

* Added creation of new board lists with persisted queries

[ci skip]

* Render placeholder row in empty queries

 [ci skip]

* Push boards on grid

* Use base class in scope

[ci skip]

* Extend api for options

* Hack spike to show D&D use case

[ci skip]

* Add ordered work packages

* Save order on existing work packages

* Boards WIP

* CDK drag

* Add dragula handler

[ci skip]

* Add filter to return all manual sorted work packages

* Print icon on hover

* Boards routing and list components

* Better loading indicator on list with streaming result

[ci skip]

* Add new board and list buttons

[ci skip]

* Post new query

[ci skip]

* Added creation of new board lists with persisted queries

[ci skip]

* Render placeholder row in empty queries

 [ci skip]

* Save queries in grids

[ci skip]

* Renaming queries

[ci skip]

* Add existing work packages to board

[ci skip]

* Introduce card view component for work packages

* Extend grids to allow project scope for boards (#7025)

Extends the grid backend to also be able to handle boards. In particular, it adds the ability of boards to be attached to projects and changes the page property of grids to a scope property that better describes that more than one board can belong to the same scope (e.g. /projects/:project_id/boards).

For a fully featured board, though, widgets need to be able to store options, so that they can store queries. Those widgets might also need to have custom processing and validation. That part has not been implemented.

* introduce project association for boards

* have dedicated grid registration classes

* update and create form for board grids

* extract defaults into grid registration


[ci skip]

* Add drag and drop to card view

[ci skip]

* Add options to grid

* Fix option migration name

* Renaming boards

[ci skip]

* Frontend deletion of boards

* Avoid map on NodeList which doesnt exist

[ci skip]

* Add inline create to boards

[ci skip]

* Smaller create button

[ci skip]

* Add navigation for boards

* Make inner grid same height

* Replace index page with table

* Workaround for widget registration

[ci skip]

* Fixed height for cards and tables

[ci skip]

* Implement escape as cancel d&d action

[ci skip]

* Fix and extend grid specs for name and options

* Extend board specs for required name

* Fix migration for MySQL references

https://stackoverflow.com/a/45825566/420614

* Make board list extend from widget

Since we cannot configure widgets yet, it's not yet possible to use a
board-list widget anywhere.

* Fix specs

* Fix escape listener removal

[ci skip]

* Fix renamed to_path in relation spec

[ci skip]

* Allow deletion of grids for boards

* Avoid reloading resource multiple times with replays

* Frontend synchronization on deletion

[ci skip]

* Delete through table

* Use work packages board path

* Use work packages board path

* Fix augmented columns breaking re-rendering

* Fix duplicated permission with forums

* Strengthen tab switch in specs

* Add hidden flag for project-context queries

Allows the API to create a hidden query that will not be rendered to the
user even if it is within a project context.

* private queries

* Add hidden flag for project-context queries

Allows the API to create a hidden query that will not be rendered to the
user even if it is within a project context.

* Move boards below work packages

* Add Board configuration modal

* Fix reloading with onPush

* Saving / Switching of display mode

[ci skip]

* Extract wp-query-selectable-title into common component

* Fix renaming of board-list

* Fix auto-hide notifications in boards

* Add permissions to seeders

* Reorder lists in board

* Linting

* Remove default gravatar from settings

* Show assignees avatar in the card view of WPs

* Fix specs

* Add missing method

* Fix timeline icon

* Use URL as input to be able to show avatars for groups, too

* Fix test

* Add further specs

* Use correct data attribute to avoid unnecessary data base calls

* Add further specs

* Deletion of board lists

* Pass permission via gon to decide whether we can create boards

* Fix rename spec

* Cherry-pick of 7873d59 and 30abc7f
2019-02-18 15:59:54 +01:00
Oliver Günther e9cc09840d Add hidden flag for project-context queries
Allows the API to create a hidden query that will not be rendered to the
user even if it is within a project context.
2019-02-08 16:01:04 +01:00
Wieland Lindenthal 5f72c654e9 Satisfy CodeClimate 2018-12-12 13:44:45 +01:00
Wieland Lindenthal a48ef771d3 Add operator "everywhere" to SearchFilter.
Remove duplicate listing of NotEquals operator.
2018-12-10 16:42:22 +01:00
ulferts 4209539da9 Feature/angular calendar (#6766)
* replace rails based calendar with angular

* render empty calendar

* update query on month switch

* introduce specific interval filter

* show colors

* remove now unused filter partial

* start on retaining the view in the url

* hide datesInterval filter

* I18n for calendars title

* stengthen explicity of expected filters

* spec moving to the next month

* fix FilterSerializer reference

* remove outdated feature spec

* rework calendar controller specs

* avoid undefined columns

* bump ng-calendar to 1.7.0

* Revert "fix FilterSerializer reference"

This reverts commit 2bb2e574cdd664a02a4eb9c3e94b5a170aec0a67.

* Revert "avoid undefined columns"

This reverts commit bcbb381b34b095526d3ee1aa15d6263a658c03c0.

* load initial query only after calendar has been loaded

* implement month remembering

* implement history back and forth

* cleanup code

* remove unused methods

* remove order value from filters

* replace rails calendar widget completely

* fix shrinkwrap

* move module into correct namespace

* linting

* remove unused js

* calculate full calendar height dynamically

* setting calendar locale from service

* retain week on reload

* show notification in case of too many results

* show tooltip on hover

* go to work package on click

* deactivate tooltip before wp show

* narrow down style to tooltip

* [28885] Improve html title consistency when navigating to queries

Currently, query names are not reflected in the HTML title. This results in 'wrong' titles being shown when entering a split or full view and then returning back to the list.

https://community.openproject.com/wp/28885

[ci skip]
2018-11-12 09:53:21 +01:00
Oliver Günther 1c7626efe8 [28348] Coalesce values for contains filter
https://community.openproject.com/wp/28348
2018-08-22 11:20:42 +02:00