94 Commits

Author SHA1 Message Date
Tobias Dillmann b698ef9eb6 Catch malformed filter parameters 2026-06-11 09:13:49 +02:00
ulferts 7653fbf66b workspace references in representers and auxilliary endpoints 2025-11-25 16:47:59 +01:00
Alexander Brandon Coles 5e9f3827f5 Freeze string literals in app/services
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/services
2025-07-18 17:45:24 +01:00
Christophe Bliard a407f61b4d refactoring: improve readability 2025-03-27 11:24:35 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Eric Guo 14865f5800 Fix rubocop warning: Assignment Branch Condition size for calculate_resulting_params is too high 2024-05-29 17:09:41 +08:00
Eric Guo 7c71eedb13 Possible provided_params already symbolized. 2024-05-29 17:09:41 +08: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
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
Pavel Balashou 84a98b07a3 Use valid_subset option.
The reason is to not get 400 Bad request from the API
when one of the work packages has been deleted, for example.
2023-06-21 17:55:34 +02:00
ulferts 3cd8dd4d55 remove now unnecessary default value assignment for query names
Those queries are not targetetd to be persisted. Hence, having to provide a name for them is superfluous.
2023-05-31 13:10:30 +02:00
Sebastian Fiedlschuster f4831b1b9d baseline api: rubocop refactoring
https://github.com/opf/openproject/pull/11783
2023-02-28 09:17:25 +01:00
Sebastian Fiedlschuster a24a06fefa baseline api: refactoring nomenclature in collection representer
`query` refers to the `Query` object. `query_params` refers to a hash of query parameters.

https://github.com/opf/openproject/pull/11783#discussion_r1116731624
2023-02-27 23:03:21 +01:00
Sebastian Fiedlschuster 0861cb95eb baseline api: minor corrections after review
review by Jens Ulferts

https://github.com/opf/openproject/pull/11783
2023-02-27 15:59:13 +01:00
Sebastian Fiedlschuster a6ff6bf203 Merge 'dev' into https://github.com/opf/openproject/pull/11783 2023-02-20 13:18:01 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Sebastian Fiedlschuster 8bbbebaafc baseline api: rubocop refactoring
https://github.com/opf/openproject/pull/11783
2022-12-20 22:45:16 +01:00
Sebastian Fiedlschuster 17db827554 baseline api: pass query and timestamps to the WorkPackageCollectionRepresenter
https://github.com/opf/openproject/pull/11783
2022-12-18 14:34:30 +01:00
Sebastian Fiedlschuster 151adf5551 baseline api: parse timestamps in ParseQueryParamsService
https://github.com/opf/openproject/pull/11783
2022-12-08 21:48:59 +01:00
Oliver Günther abc730ed0f Fix self and offset links with empty select param
The select query param is output as empty if not passed, this breaks self, next, jumpTo, etc. links
2022-08-08 14:46:24 +02:00
Christophe Bliard b50855a955 Use ServiceResult factory methods where possible
All was automatic through the use of `rubocop --autocorrect --only
OpenProject/UseServiceResultFactoryMethods app lib lib_static modules
spec`.
2022-06-16 10:01:57 +02:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
ulferts f1111922ed use API::ParserStruct for all API parsing 2022-04-12 13:03:37 +02:00
Benjamin Bädorf b7f732ddcc Feature/41135 include all subprojects (#10413)
* Add new query attribute include_subprojects

* Set include_subprojects in factories

* Replace create_query helper with default endpoint

* Adapt spec to new query create service

* Add spec for changed subproject behavior

* Extend project filter with replaced values and add spec

* Fix spec trying to save default query

* Fix ordered_work_packages now that we're base service compatible

* Basic frontend for include all subprojects

* Fix disabled state, update button colors

* Add new query attribute include_subprojects

* Set include_subprojects in factories

* Replace create_query helper with default endpoint

* Adapt spec to new query create service

* Add spec for changed subproject behavior

* Extend project filter with replaced values and add spec

* Add a ParserStruct overriding Enumerable#group_by

* Fix ordered_work_packages now that we're base service compatible

* Add tooltip

* Add tooltips to include projects

* Add is parameter to query props for query space

* Fix specs, add i18n strings

* Correctly parse and update the query with includeSubprojects

* FIx most spec

* Fix badge count for team planner spec, fix duplicated where def in project filter

* Only load project list if opening drop modal

* Expect that sub_sub_bug is also present

* I18nify the strings

* Fix typo

* Fix specs

* Fix linting errors

* Fix specs

* Fix linting errors

* Fix linting errors

* Fix failing specs

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2022-04-07 11:40:36 +00:00
ulferts a80767f516 stub for signaling on work package resource 2022-03-03 14:59:31 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
luz paz 1830420679 Fix various typos
Found via `codespell -q 3 -S ./config/locales,./modules/xls_export/config/locales,./modules/job_status/config/locales,./modules/two_factor_authentication/config/locales,./modules/backlogs/config/locales/crowdin -L ba,nd,parms,sur,varius`
2022-02-16 20:10:49 +01:00
ulferts e4cbf6deee replace usage of OpenStruct 2022-01-26 17:10:46 +01:00
Oliver Günther e5dec2dc31 Add notification group_by for projects with transformed keys 2021-09-13 20:50:51 +02:00
Oliver Günther 4e2dc171db Extract group functionality into index endpoint 2021-09-13 14:19:13 +02: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 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
ulferts 441bb340ff allow pageSize = 0 on manually sorted queries
This allows fetching the query without the added burden of having to
render the work packages. Rendering the work packages increases the
response time heavily.
2021-02-05 20:23:11 +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
Benjamin Bädorf e848d44dea Fix/update wysiwyg styles (#8844)
This is a refactoring of the CSS classes in the WYSIWYG editor. The classes now use proper BEM and are almost completely independent of other CSS. It also includes small style refactorings, like a reduction of heading size in attribute fields, and an increase in heading size in all other instances.

* Initial class definitions

* Added more classes

* Added Table of Contents basics

* CkEditor applying custom CSS classes to p, h1, h2, h3, h4, h5, h6, li and blockquote

* CKEditorInspector removed

* op css class for headings

* op css class for paragraphs

* op css class for code/code block

* adapt specs to altered markdown/html generation

* adapt grid/budget representers to altered signature

* op css class for lists

* op css class for toc

* op css class for links

* Start working on typography css

* op css class for tables

* Fixing more typography, trying out larger headers

* Applying custom classes to li, a, blockquote, figure, table, tr, td, th, image, codeblock, figcaption and macros

* adapt specs to altered link classes

* op css class for images

* apply user content container class throughout application

* CSS alignment custom classes applied to table

* op css class for task list checkbox

* Added task checkbox class

* amend list checkbox class in backend

* op css class for table thead element

* adapt specs on image html generation

* Updated table and typography styles

* Update typography and figure styles

* Figure overflow handling

* Table alignment styles + ckEditor styles removed

* rename wiki-anchor to op-uc-link_permalink

* wrap table in div as well as figure

* Updated code-block

* Update permalinks

* Fixed a lot about tables

* Removed Description header from work-packages page

* Fix frontend styles

* Add placeholder styling, fix toc

* Fixed figure print

* working with table aligns

* Custom class add to task lists

* Custom classes applied to theads

* op-uc-container custom class added to container

* Codeblocks inside pre elements

* Fix: single <code> and <a> tags

* explicitly require overwritten gem class

Apparently, the gem is not loaded yet when it is registered as a filter when in eager loading mode

* adapt spec expectation to altered toc rendering

* CkInspector removed

* Latest ckeditor changes

* remove highlight css class from wiki content

* allow html pipleline to handle macros with additional classes

* Fixed a lot of print css for tables

* Add general print css back in

* Update Table of Contents styling

* Custom classes on ul, ol, li and task-lists

* Revert "Custom classes on ul, ol, li and task-lists"

This reverts commit 0d27d28137.

* Custom classes on ul, ol, li and task-lists

* Custom classes on column's th

* remove placeholder class when rendering

* WOrking on task lists

* Changing task-list classes, changed tests

* Updated list styles

* Remove unused todo list styles

* remove checked in binstubs

* Fix table of contents

* adapt todo list handing in backend pipeline

* adapt specs to altered css classes

* Add numbers to table of contents

* Better comments in table of contents

* Fix: wrap single <table> with a <figure>

* Fixes to todo list design

* Updated todo list scss to fix nested lists

* adapt selectors in table spec

* Update table styles

* Improve table borders more

* Custom classes specs

* Fix: no need to remove regular list classes when its type changes

* Add modifier for inline headings

* Update table editing styles

* Remove break-word tests

* wrap images just like tables

* Update figure content styles

* Fix: All tests passing (ul.op-uc-list_task-list)

* div.op-uc-figure--content wrapping tables

* Specs for figures wrappers div.op-uc-figure--content

* Fix: add custom classes to links and codes again

* Table wrapper div reverted + specs

* Fix inline palceholders

* Custom macro type classes

* Add basic macro placeholder changes

* Move heading permalink after text

* Fix word-break spec

* Sending figure styles to the backend (width)

* extend test to take ckeditor placeholder into account

* avoid adding bem classes multiple times

* attempt to fix flickering spec

* Removing image spinner when uploading finishes

* adapt spec expectations

Co-authored-by: Aleix Suau <info@macrofonoestudio.es>
Co-authored-by: ulferts <jens.ulferts@googlemail.com>
2020-12-04 12:25:26 +00:00
ulferts 245a7ddfcf Fix/duplicate work packages across pages (#8651)
* deprecated method

* remove apparently unused methods

* append id desc sorting to work packages

* enforce sorting is applied in query results

* ensure deterministic order in base query
2020-09-10 11:37:50 +02:00
ulferts 38d2707946 Fix/wp sums in db (#8580)
* remove apparently unused methods

* have specs for wp query sums

* grouped sums in sql

* sql for total sums

* alter interface of all_grouped_sums

Since we now fetch all sums in one sql statement it no longer makes sense to fetch the group sums individually

* remove now unused method

* extract method

* Add material_costs to summing

* add labor_costs to group sums


* add overall costs to sum

* fix sum grouping descision

* fix summable? check

* remove work_package_list_summable_columns setting

Now all summable columns are always summed. The user no longer needs to select summing up in the settings. Selecting the column to be displayed and activiating sums will suffice

* fix flickering spec
2020-08-24 07:22:43 +02:00
ulferts 0b15c2841d allow filter for firlters params
Users sometimes get stuck by typing filter instead of filters for the query params filters property. We can be lenient here.
2020-08-04 14:33:12 +02:00
Oliver Günther adb94a19f8 [31902] Ensure we pass the query_id in case of manual queries
https://community.openproject.com/wp/31902
2020-02-28 10:37:49 +01:00
Oliver Günther 7b56b1c886 [32354] Correctly escape filters in frontend to avoid unescape
The filters were not correctly escaped in the frontend, causing special
query characters such as & to break to search.

https://community.openproject.com/wp/32354
2020-02-26 13:31:10 +01:00
ulferts 51b1ef026c add specific api end points for allowed work packages for time entries 2020-01-29 08:56:12 +01:00
ulferts a0845090c1 Merge branch 'release/10.3' into dev 2020-01-23 13:15:41 +01:00
ulferts 269416aad9 fix special chars in search
URL encode in angular and decode in rails
2020-01-20 16:52:44 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts cbe92dfb79 extract duplicate listing into constants 2019-12-16 12:20:42 +01:00
ulferts a9ed1ef372 refactor ParseQueryParamsService 2019-12-12 17:19:06 +01:00
ulferts dc9c8faf3c extend default endpoints to bcf api 2019-11-13 09:18:34 +01:00
ulferts 9a11e768cc add put end point for projects 2019-11-12 15:06:54 +01:00