69 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
ulferts 321ce3aa4d adapt query parsing json error expectation due to gem bump 2025-05-20 09:25:50 +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
Aaron Contreras 8577af8a97 Bump json-jwt 2024-10-28 10:48:47 -05:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +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
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
Christophe Bliard df827db627 Refactor CustomField factories using traits
Reduce duplication and harmonize the factory names:
- bool/boolean => boolean
- int/integer => integer

Co-authored-by: Aaron Contreras <aaronlcaq@gmail.com>
2023-08-29 08:57:39 +02:00
Oliver Günther 117d82e724 Remove show_changes and more_global_index_pages feature flags
https://community.openproject.org/work_packages/49510
https://community.openproject.org/work_packages/49509
2023-08-07 13:38:43 +02:00
Christophe Bliard 29485f9450 Fix test 2023-06-22 18:12:33 +02:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +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
Dombi Attila d340dde884 Store the original string instead of the parsed one in the Timestamp class 2023-05-24 14:25:35 +03:00
Dombi Attila c193387b5c [#47862] Support timezones in the Query#timestamps relative date keywords.
https://community.openproject.org/work_packages/47862
2023-05-03 11:27:26 +02:00
Oliver Günther 07de85a7d4 Add feature flag to relevant specs 2023-04-27 12:30:57 +02:00
Dombi Attila 8f13c1bc2d Update the documentation regarding the relative date keywords, and rename them to reflect their purpose better 2023-04-20 19:40:30 +03:00
Dombi Attila 6b4bf96663 Update the work package query timestamps to allow the date bare words 2023-04-20 19:20:45 +03: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 a6ff6bf203 Merge 'dev' into https://github.com/opf/openproject/pull/11783 2023-02-20 13:18:01 +01:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Sebastian Fiedlschuster 2b86510a87 baseline api: rubocop refactoring
https://github.com/opf/openproject/pull/11783
2022-12-21 00:09:12 +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 3231f1d7f9 baseline api: handle special-value timestamps like "now" or "2y"
https://github.com/opf/openproject/pull/11783
2022-12-08 23:28:00 +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
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
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
ulferts e4cbf6deee replace usage of OpenStruct 2022-01-26 17:10:46 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +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 ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
Phil Davis bbe289cadd Fix various docs typos 2021-06-03 14:56:35 +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
luz paz 3683042c9b Fix typos in user facing and non-user facing code
Found via `codespell v2.1.dev0`
2021-01-24 15:08:21 +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
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