213 Commits

Author SHA1 Message Date
Tomas Hykel 948fa43321 chore: Remove feature flag for project-based work package identifiers 2026-05-25 17:45:06 +02:00
Kabiru Mwenja 81fbb035cc Add integration tests for semantic identifier resolution
Verify that semantic work package identifiers (e.g. "TESTPROJ-1")
are resolved end-to-end through the controller and API layers,
using with_settings/with_flag helpers instead of allow mocks.
2026-04-15 15:54:50 +03:00
Kabiru Mwenja baa1da4a89 Use real DB objects in work_packages_controller_spec
Replace stubbed work package and mock permission chain with real
database records and role membership. This eliminates rubocop violations
(ExpectInHook, StubbedMock, MessageChain) while also testing the actual
finder path through WorkPackage.visible.
2026-04-14 17:38:13 +03:00
Kabiru Mwenja 63e9854836 Make find/exists? resolve semantic work package identifiers
Extract FinderMethods module that transparently resolves both numeric and
semantic identifiers (e.g. "PROJ-42") using FriendlyId's Object#friendly_id?
for dispatch. The module is included in both the WorkPackage class and
extended onto every relation, so scoped queries like
WorkPackage.visible(user).find("PROJ-42") work seamlessly.

- Override find to resolve semantic IDs via identifier column + alias table
- Override exists? with the same resolution chain
- Refactor find_by_id_or_identifier to use friendly_id? instead of semantic_id?
- Update API route to accept string IDs (type: Integer → type: String)
- Update controller and ViewComponent finders to use find_by_id_or_identifier
- Pass display_id from Rails views to Angular custom elements
2026-04-14 17:38:12 +03:00
Kabiru Mwenja 8dbac61c57 Add project-scoped configuration API [OP#70979]
Adds `GET /api/v3/projects/:id/configuration` endpoint that returns
all global configuration properties plus project-specific settings.

This allows client apps to check both enterprise token features
(availableFeatures) and project settings (enabledInternalComments)
in a single API call.
2026-01-29 10:32:29 +03:00
Henriette Darge 655756631f [67007] Render the WP full view from rails (#20109)
* Create a FullView::CopyComponent for WorkPackages which is routed from rails

* Remove angular splitCopy route and component as it was overwritten by the angular fullCopy route for quite some time already and nobody complained. So we decided to remove the splitCopy completely

* Create FullView::CreateComponent for WorkPackages which is now routed from rails instead of Angular

* First draft of implementing the FullView route for WorkPackages from rails

* Pass correct tab from the URL to the FullView::ShowComponent

* Do a hard reload to "create" route when we are not routed from Angular

* Adapt routing spec to new WorkPackage routes and to some fine-tuning with the WP routes

* Show correct tab in WP Full view and change URL when clicking a tab entry

* Adapt to new rails based routing

* Fix some routes and redirects

* Make sure, the split screen stil renders correctly

* Remove back button from WP full view

* Fix routing issues

* Start fixing specs

* Attempt to override the browser history to be able to use browser back

* Use helper function to build new WP url string

* Adapt spec that now partially renders backend toasts

* Remove ability to move to fullscreen

Theoretically, we can re-add it by posting to some form endpoint, but
not worth it for the first iteration

* Disable cache-control on angular routed pages, so back links work

* Fix double click to fullscreen

* Adapt navigation and title setting

* Let WP breadcrumb to a hard reload instead of Angular transition

* Redirect when the WP route is incomplete (this is the attempt to re-implement an angular functionality)

* Navigate with Turbo when double clicking a card

* Adapt onboarding tour to new hard reload when switching to WP full view

* Fix some specs

* Fix more tests

* Hide Overview tab on FullView

* Correct check for incomplete routes

* Do a hard refresh when coming from slpit screen to full view

* Fix notification navigation

* Adapt attachment spec as the tab switch cannot be done anymore while dragging

* Fix more tests

* Please rubocop and fix more tests

* Attempt to fix navigation_spec

* Add debian_base for pullpreview

---------

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2025-11-03 09:02:16 +01: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
Bruno Pagno aa53f1fa09 remove internal comments feature flag 2025-04-29 10:30:11 +02:00
Bruno Pagno 97ccf0bfc5 adjust internal comments internal representation 2025-04-24 13:12:32 +02:00
Bruno Pagno 15596fdd66 hide internal comments for users without permission on atom export 2025-04-14 09:46:16 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin 0b87ed9b6a remove newlines from context descriptions 2024-07-29 19:27:17 +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
Klaus Zanders ad787b92e6 Fix all instances where we mocked permissions on nil 2023-10-18 16:15:46 +02:00
Klaus Zanders 0c2011216f Rename methods for mocking to allow_xxx schema
Co-authored-by: Christophe Bliard <c.bliard@openproject.com>
2023-10-16 08:41:06 +02:00
Klaus Zanders 706bd8dfbb Remove bang 2023-10-09 10:49:02 +02:00
Klaus Zanders 59e6dfff40 Review feedback: all_permissions_allowed -> allow_everything 2023-10-09 10:44:45 +02:00
Klaus Zanders e3257c7667 Change calls using mocks on the user to our new mocking helper 2023-10-09 10:44:42 +02:00
Klaus Zanders f64fde1c15 Fixes Performance/StringReplacement offenses 2023-09-06 13:08:22 +02:00
as-op 965d624bed [#48652] Show relevant attributes in file name of pdf export & truncate to 255 chars
https://community.openproject.org/work_packages/48652
2023-07-06 11:58:16 +02:00
as-op ec22daf476 [#48652] add date and time to file name of pdf export
https://community.openproject.org/work_packages/48652
2023-07-03 12:58:34 +02:00
as-op 74dc618781 [#48652] add date and time to file name of pdf export
https://community.openproject.org/work_packages/48652
2023-07-03 12:19:30 +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 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
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 c6e44141db Remove :stubbed_work_package factory
Using build_stubbed(:work_package) works equally well.

Relates to commit e1607a6116
2022-06-08 15:24:11 +02: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
Christophe Bliard 47a297daae Fix argument alignment since f08bea3467 (#10129)
* Fix argument alignment since f08bea3467

The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.

* do not fix alignments for modules/*/spec yet

hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
2022-02-02 21:48:06 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Oliver Günther cf7993bf22 Fix single PDF export options 2021-11-02 16:15:05 +01:00
Oliver Günther e5702639c3 Fix single PDF export spec 2021-11-02 16:15:04 +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
luzpaz 2ae53bd252 Fix typos in user facing and non-user facing code (#9497)
* Fix typos in user facing and non-user facing code

Found via `codespell -q 3 -S ./config/locales -L ba,nd,parms,sur,varius`

* Fix strings in specs
2021-07-21 17:26:31 +02: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 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
Oliver Günther 88cb21a594 Fix export spec 2020-06-25 11:13:10 +02:00
Oliver Günther 2d61cb92be Fix expected response in export 2020-06-17 16:24:07 +02:00
ulferts 4cb0d0ff91 Feature/delayed bcf export (#8275)
* delayed bcf export

* remove unnecessary eager loading

* Update rxjs polling statement with loading indicator

* Avoid error handling due to JSON parsing

* delay all wp list exports

Co-authored-by: Oliver Günther <mail@oliverguenther.de>

[ci skip]
2020-04-20 16:16:01 +02:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 4e5b9afef5 rename project attributes 2019-09-24 09:28:53 +02:00
Oliver Günther e0f5dee13d Show an error when WP cannot be loaded 2019-09-04 13:23:52 +02:00
Wieland Lindenthal bf56a36945 Fix fallback path for Exporter and and specs 2019-04-03 17:06:35 +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
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