249 Commits

Author SHA1 Message Date
ulferts 28ff65cb0e attempt to fix flickering activity spec
rspec ./spec/features/activities/activity_page_navigation_spec.rb:137
2026-06-05 15:58:48 +02:00
Kabiru Mwenja 5fdf57df69 Defer activity-tab sequence_version to anchor resolution
The work package activity tab computed a per-journal sequence_version on
every render — a ROW_NUMBER() window function over a LATERAL join — only to
stamp the legacy data-anchor-activity-id that #activity-N deep links rely on.
Nothing mints those links anymore; copy and share links use
#comment-<journal id>, which needs no extra query.

The activity number is now resolved on demand. Only a request carrying
?anchor=activity-N runs the window function, mapping the number to a journal
id the paginator exposes as resolved_anchor. The view hands that to the
client, which rewrites #activity-N to the canonical #comment-<id> and scrolls
using the comment anchor already present in the DOM. Default renders no longer
touch the window function.

References WP #68063.
2026-06-05 14:26:04 +03:00
OpenProject Actions CI 7e1c003ba7 Merge branch 'release/17.4' into dev 2026-05-20 06:43:24 +00:00
OpenProject Actions CI 82c65d6a27 Merge branch 'release/17.3' into release/17.4 2026-05-20 06:42:24 +00:00
Oliver Günther 3fcdc893b4 Also use visible scope for activities view 2026-05-19 08:47:56 +02:00
ulferts eaf26e4918 attempt to fix flickering activities spec
rspec ./spec/features/activities/work_package/activities_spec.rb:678
2026-05-08 11:14:03 +02:00
Henriette Darge 828554d37b Reactivate test since the changed behaviour of the tests now enables this again 2026-05-07 09:28:48 +02:00
Alexander Brandon Coles 6d26354d3e Fix activity editor rescue CD in zoneless mode
In zoneless mode, the Stimulus `EditorController` connects before
CKEditor finishes its async initialization. The original
`openEditorWithInitialData()` checked `isEditorEmpty()` which returned
`false` when `ckEditorInstance` was `undefined` (since `undefined !==
''`), silently skipping `setData()` and leaving the editor empty.

Introduces `setEditorDataWhenReady()` which uses a `MutationObserver`
to detect when CKEditor's editable element appears in the DOM, then
defers `setData()` via `setTimeout()` to ensure Angular's CKEditor
initialization Promise chain has fully completed.

Also adds a `$transitions.onSuccess` hook that calls
`ApplicationRef.tick()` after UIRouter transitions, ensuring CD runs
in zoneless mode so that split-view tab switches properly
destroy/recreate components.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:21:34 +01: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
ulferts 365d3e8dc2 rename Project status to Status 2026-01-06 14:55:20 +01: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
Christophe Bliard 3b18f349bd Remove outdated feature test 2025-10-27 11:00:38 +01:00
Christophe Bliard 40e4b36fc8 [68600] Carry over user filter when applying type filters in activity
https://community.openproject.org/wp/68600
2025-10-27 11:00:38 +01:00
Henriette Darge 77d8803d06 Hide the module globally if no project has it activated 2025-10-15 14:01:11 +02:00
Kabiru Mwenja 448b32849c Create enough comments > 1 page 2025-10-08 15:42:45 +03:00
OpenProject Actions CI a69f99f061 Merge branch 'release/16.4' into dev 2025-09-24 12:14:10 +00:00
Kabiru Mwenja 61d1ddea4c Fix internal comment checkbox state not persisting across tab navigation
Added localStorage persistence to maintain internal comment checkbox state when users switch between work package tabs.
The state is isolated per work package to prevent interference between different work packages.

https://community.openproject.org/wp/67608
2025-09-23 19:04:46 +03:00
Judith Roth 812f826bf0 [#62712] Highlight the relevant target element when the user gets to a page via a deep link
https://community.openproject.org/work_packages/62712
2025-09-04 11:23:29 +02:00
Klaus Zanders 678cfc2fd0 Fix specs for reporting to work with autocompleters 2025-08-05 12:30:43 +02:00
ulferts 08135aa9c8 attempt to fix flickering spec 2025-07-30 11:47:22 +02:00
Kabiru Mwenja a285cdcd15 Fix auto-scrolling after activities tab refactoring
During the controller decomposition, the scroll position check was
moved to after DOM updates instead of before, breaking auto-scroll
behavior when new comments were added.

Captures scroll position before streams update in PollingController
and passes it to AutoScrollingController to restore proper behavior.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 11:39:08 +03:00
Alexander Brandon Coles 6892ac9d65 Merge branch 'dev' into merge-release/16.2-20250718035236 2025-07-18 08:59:00 +01:00
Kabiru Mwenja 33d3953701 bug/63545 When editing a comment in the activity tab and polling occurs, the form can be force closed (#19507)
The activities tab polling mechanism updates newly updated journals, based on the last update timestamp. In case an attachment is added, or the journal is updated in any other places- the UI item would be updated\ on the next poll, overriding the edit form.

This commit adds an exclusion for any forms that are in "edit" state- it does not yet take into account conflict resolution.

https://community.openproject.org/wp/63545
https://community.openproject.org/wp/65680
2025-07-15 14:46:29 +03:00
Klaus Zanders cd19180e64 fix one more translation spec 2025-07-09 10:41:36 +02:00
Klaus Zanders 0aa39c5c2d Fix time entry activity spec 2025-07-09 10:41:27 +02:00
Klaus Zanders 4688953e8a more feature updates 2025-07-09 10:41:16 +02:00
OpenProject Actions CI 4f59cb992f Merge branch 'release/16.0' into dev 2025-05-31 03:45:12 +00:00
Kabiru Mwenja e66502e8df bug/64324 Enhance internal comments feature plan access (#19057)
https://community.openproject.org/work_packages/64324
2025-05-30 11:45:18 +03:00
Henriette Darge b2ca041022 Merge branch 'dev' into merge-release/16.0-20250520034636 2025-05-20 10:43:07 +02:00
Kabiru Mwenja 88415dca84 Use capybara rich text selector for label assertion
The capybara acessible :rich_text selector includes an `aria-{label,labelled-by}` location finder
https://github.com/citizensadvice/capybara_accessible_selectors/blob/b60eebb9673b20dd472afb3d724340a6f6132bcb/lib/capybara_accessible_selectors/selectors/rich_text.rb#L18

Co-authored-by: Alexander Coles <a.coles@openproject.com>
2025-05-16 13:22:51 +03:00
Kabiru Mwenja 86eb9eacef Use visually_hide_label option instead
Stay consistent with primer as pointed out in the following review!
https://github.com/opf/openproject/pull/18903#pullrequestreview-2833035563
2025-05-13 14:40:06 +03:00
Kabiru Mwenja f58a7a6714 Missing Form Label in work package comments rich text editor raises browser console error
https://community.openproject.org/work_packages/63898

Amend the text area label requirement introduced in 6bf31400ed to allow for an alternate
ARIA-label as not all use cases fit this requirement- but there should always be a reference for screenreaders.
`aria-labelled-by` OR `aria-label`

As CKEditor re-renders the text area aria-label in every focus/blur event, we rely on the focusTracker to keep the aria-label
updated
2025-05-13 14:32:13 +03: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
Kabiru Mwenja 700166f993 feature/63646 Remove work_package_comment_id_url feature flag (#18740)
https://community.openproject.org/work_packages/63646
2025-04-29 15:52:46 +03:00
Bruno Pagno 8c05f23760 Merge pull request #18733 from opf/impl/61061-banners-and-settings-internal-comments
adjust banners + settings for internal comments
2025-04-29 13:42:57 +02:00
Bruno Pagno 4a1ae02615 adjust banners + settings for internal comments 2025-04-29 10:30:35 +02:00
Bruno Pagno aa53f1fa09 remove internal comments feature flag 2025-04-29 10:30:11 +02:00
Kabiru Mwenja a817e74ae9 Touch up InternalCommentMentionsSanitizer (#18736)
* Rename InternalMentionsSanitizer "notes" to "comment" Better represent that the class recieves a "work package comment" and not a "note"
* Fully qualify `InternalCommentMentionsSanitizer` class name
2025-04-25 22:32:57 +03:00
Kabiru Mwenja bddb7055bb bug/63637 After clicking on "Make public" once, subsequent "cancel" actions do not retain the "Internal comment" checked state (#18737)
Reset the confirmation dialog [returnValue](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue) on every showDialog() instance so that the state is always "fresh"

https://community.openproject.org/wp/63637
2025-04-25 20:04:39 +03:00
Kabiru Mwenja 98b65c73f0 Implementation/63625 Rename restricted visibility checkbox to internal comment (#18726)
https://community.openproject.org/work_packages/62785
2025-04-24 18:52:00 +03:00
Kabiru Mwenja 701b252119 feature/62785 Show warning if a user tries to uncheck the 'Internal comment' checkbox when there's already text in the comment box (#18695)
https://community.openproject.org/work_packages/62785
2025-04-24 18:46:16 +03:00
Bruno Pagno 97ccf0bfc5 adjust internal comments internal representation 2025-04-24 13:12:32 +02:00
Bruno Pagno c2886046cd update comment permission names 2025-04-24 13:12:32 +02:00
as-op a283534b00 Merge branch 'release/15.5' into merge-15.5-into-dev
# Conflicts:
#	config/locales/crowdin/ru.yml
#	modules/boards/config/locales/crowdin/cs.yml
#	modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb
#	modules/storages/config/locales/crowdin/it.yml
2025-04-24 10:33:22 +02:00
Kabiru Mwenja 66ea574dfc implementation/63384 On work package comment edit set attachment replacements (#18648)
Set comment attachment replacements on edit

When a comment is updated, replace attachments.

https://community.openproject.org/wp/63384
2025-04-22 09:55:10 +03:00
Christophe Bliard 46c83343f9 Fix flaky spec
Failing spec ./spec/features/activities/work_package/activities_spec.rb:539
on job run https://github.com/opf/openproject/actions/runs/14531919190/job/40773106633

The test did not correctly wait for the second journals changes to be
displayed. It was waiting with
`activity_tab.expect_journal_changed_attribute(text: "Subject")` but as
the subject was already changed in the first journal entry, it was
returning immediately and did not wait for the second journal entry to
be updated.

Waiting for `activity_tab.expect_journal_changed_attribute(text: "A new
subject")` instead forces the test to wait for the second journal entry
to be displayed and fixed the flakyness.
2025-04-18 11:24:07 +02:00
Kabiru Mwenja 64fa080d3f Remove redundant specs
Attachment scenarios are covered in `spec/features/activities/work_package/activity_tab_comment_editor_spec.rb`
Notably: there is no longer a special permission for adding attachments to wp comments, rather they are treated
as inline- if a user can comment, then they can add attachments.

The lifecycle of the attachment is tied to it's containing comment.
2025-04-14 16:33:55 +03:00
Kabiru Mwenja 8ead44ad71 Merge branch 'dev' into implementation/62363-adapt-attachment-uploads-on-comments-so-that-they-are-attached-to-the-container-on-submit 2025-04-10 13:15:18 +03:00
Bruno Pagno 5c2340e5fd Merge pull request #18573 from opf/fix/restricted-comments-on-polling
Fix polling of restricted comments
2025-04-08 17:47:39 +02:00
Kabiru Mwenja e3a358e166 Specify inline attachment in spec 2025-04-08 14:52:38 +03:00