25 Commits

Author SHA1 Message Date
ulferts 222639f8d4 include filter working with portfolios and programs 2026-04-30 10:18:09 +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
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 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +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
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
Oliver Günther 92259181ce Adapt specs to use introduced helpers 2023-09-13 09:02:42 +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
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01:00
Christophe Bliard 2ab6a6baf2 lint: Make rubocop happier 2023-03-07 16:41:58 +01:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +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
Benjamin Bädorf ed9b667f54 Fix/40286 fixes 1 (#10872)
* Reduce spacing per level in op-project-autocompleter

This used to be 20px per level, but is now reduced to 16px, or 1rem, to
align with `spot-list`

* Fix op-project-autocompleter appendTo and disabled reason

The disabled reason text was shown even if the item was not disabled.
This is fixed here. Also, the op-project-autocompleter appended the
results modal to `body` by default, but that screws up scrolling
oftentimes, so here it is changed back to open in-context by default.

* Disable parent projects of search results

In project-include, parent projects of search results were still
clickable. This behaviour was not to spec, so we now disable projects
that were not directly search results.

* Disable projects that are not search results

In the global project select drop-modal,
all projects were clickable before this.
However, when a project was shown only because
child projects matched the search criteria, it
should be disabled. This commit fixes that.

* Always open project select on top in notification settings

* Fix styling issues in op-project-autocompleter

* Fix text color for list items in project drop modals

* Auto-open project dropdown in work package table

* Fix tooltip being cut off by overflow: auto in project list

* Fix failing spec

* Fix failing spec

* Fix linting errors

* Fix onchange for empty project select on work package move page

* Fix linting errors

* Fix the way focus works in inline create

* Adapt spec to match disabled item

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2022-07-05 21:42:28 +02:00
ulferts 834ce500b5 Merge branch 'release/12.1' into dev 2022-07-04 10:53:04 +02:00
ulferts a62079727f ignore undisclosed ancestors on hierarchy building 2022-07-04 08:31:02 +02:00
Benjamin Bädorf 5d0524e7a7 Fix project selectors being stuck without results (#10885)
* Fix project selectors being stuck without results

Both project-include and the global project menu blocked themselves
into the loading state when no results were returned. This was caused
by a faulty "loaded" check.

Closes https://community.openproject.org/work_packages/42908/activity

* Clean up project include changes

Removes an unnecessary setTimeout that was added for debugging purposes,
and adds an explanatory comment to cryptic loading booleans.

* Add regression test
2022-06-30 08:18:55 +00:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +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 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 67eb51769a Feature/40330 projects include filter (#10199)
* Add SPOT foundation styles

* Initial work on buttons

* Implement basic examples page

* Improve spot-checkbox

* Add outline buttons in HTML

* Checkbox works

* Add filter chips

* Initial text field implementation

* Chip field initial implementation, add filter-chip component

* Keep old styleguide page

* Add drop modal component

* Finish checkbox list

* Improve action bar

* Add drop modal alignment options

* Fix drop modal zindex

* Make sure clicks do not close the drop modal, add escape closing event for drop modal

* Add spot-body

* Don't hide drop modal body via display

* Start work on project select

* Add basic form

* Switch to FormGroup

* Generate project data structure

* Basic selecting and unselecting works

* Update buttons and colors

* Add basic button type

* Start work on project select

* Add basic form

* Switch to FormGroup

* Generate project data structure

* Basic selecting and unselecting works

* Increase specificity of toolbar button styles

* Set line height for typography styles

* Fix buttons

* Filtering works

* Add basic toggle component

* Work on better sorting

* Set to query space filters

* Better docs

* Fix disabling current project

* Select and deselect works

* Don't use reactive forms

* Fix heading styles

* Fix toggle font size

* Add number of projects to button

* Change the position of the project include modal in th ework packages table

* Add project include tp spec file, also search for assignees in other projects in tp

* Add current date color

* Rename project-select, initial specs working

* Fix names for form components

* Fix lst add assignee spec

* Add specs for calendar

* Add specs for calendar and wp, refactor specs

* i18nify the strings, remove button to select subprojects

* Fix import to typogrpahy after DS got merged

This otherwise raises an error

* Fix filtering for projects

* Show badge content only when loaded

* Linting

* Move duplicated specs into a shared example

* Improve selectors with retry_blocks

Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
2022-02-22 11:02:33 +01:00