871 Commits

Author SHA1 Message Date
Tomas Hykel 07eca6d8cd [STC-337] Fix rendered date of edited comments 2026-06-12 16:37:36 +02:00
Klaus Zanders 1d91460c84 Extract progress modal form glue into a shared ModalParams concern 2026-06-10 15:40:15 +02:00
ulferts db815d0d22 Merge remote-tracking branch 'origin/dev' into merge-release/17.5-20260609045502 2026-06-09 09:32:19 +02:00
Henriette Darge 7411f1d985 Set min-height to avoid label being cut off 2026-06-08 11:01:35 +02:00
Kabiru Mwenja fd22629702 Code Maintenance/STC-462: Tidy the activity-tab paginator and centralise filter modes (#23552)
https://community.openproject.org/wp/STC-462

Two readability passes over the work package activity tab, no behaviour change. The paginator's private methods are reordered to follow their call order so the file reads top-down from `#call`, and the three activity filter modes (`:all`, `:only_comments`, `:only_changes`) — until now bare symbols duplicated across the controller, paginator, journal components and the hidden form — move into a single `WorkPackages::ActivitiesTab::Filters` module so the modes have one source of truth and can't drift apart. The diff reaches beyond the paginator into the controller, several components and a form, since that's where the symbols were scattered.
2026-06-05 16:50:08 +03: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
Kabiru Mwenja 284e62abbf Switch to inline message component as the more conventional structure
Discussed in UX meeting an accepted:
https://community.openproject.org/meetings/10359#outcome-3654
2026-06-03 11:27:28 +03:00
Kabiru Mwenja 23736a12bd Add bottom spacing below the autofix preview table
The Convert identifiers button sat flush against the preview table.
The table now carries its own bottom margin (mb: 3, via Primer::Box),
matching the spacing the previous hand-rolled box had.
2026-06-02 17:23:35 +03:00
Kabiru Mwenja e6a49517cd Render semantic ID autofix preview via BorderBoxTableComponent
Long identifiers overflowed into the neighbouring column. Replace the
hand-rolled flex table with the design-system BorderBoxTableComponent,
which handles column spacing, wrapping, and responsive stacking; the
project and previous-identifier columns wrap as main columns.
2026-06-02 16:56:12 +03:00
Henriette Darge acfaf0fc5c Add truncation rules for WPCard component 2026-05-29 15:09:09 +02:00
Tomas Hykel 15f86021b1 feat: Add progress bar for identifier conversion 2026-05-20 21:28:07 +02:00
Tom Hykel 3390c54f15 Merge pull request #22853 from opf/change_instance_conversion_label
Rename label of instance identifier conversion button
2026-05-20 20:39:45 +02:00
Tomas Hykel 1ce03faa03 feat: Improve progress reporting during identifier conversion 2026-05-20 20:27:43 +02:00
Tomas Hykel b8f49b9e6e chore: Rename label of instance identifier conversion button 2026-05-20 17:37:56 +02:00
Henriette Darge e0523a54ca Merge remote-tracking branch 'origin/dev' into feature/73089-restyled-work-package-card-in-backlogs-and-sprints-view 2026-05-19 09:37:17 +02:00
Henriette Darge 7dc866dfca Avoid that the status scheme is always set and status specific highlighting is ignored.
Include some further review feedback
2026-05-18 13:41:09 +02:00
Henriette Darge 91de3310bd Extend the WorkPackageCardComponent with new optionss 2026-05-13 08:51:35 +02:00
OpenProject Actions CI 6f8a56ec02 Merge branch 'release/17.4' into dev 2026-05-12 13:36:07 +00:00
Behrokh Satarnejad 0acb8aa6a3 Include projects from descendant work packages in the danger banner 2026-05-12 08:47:16 +02:00
Tomas Hykel ae3f4aa689 fix: Adjust save button behaviour in identifier settings 2026-05-07 23:37:05 +02:00
Kabiru Mwenja d6249ca778 Use displayId on primerized split-view full-screen link
The full-screen icon link in the shared work-package-details tab component
constructed its href from work_package.id (numeric PK). All hosts of the
primerized split view — Boards, Notifications, etc. — inherited the numeric
URL. Switch to work_package.display_id so the full-view URL carries the
semantic identifier when one is configured.
2026-04-28 08:58:22 +03:00
Kabiru Mwenja debfc2141c Merge pull request #22788 from opf/implementation/73921-use-displayid-in-work-package-detail-view
Use formatted_id in server-rendered work package detail views
2026-04-23 18:40:11 +03:00
Henriette Darge bfa4c782c6 Merge branch 'dev' into code-maintenance/73671-remove-ui-router-from-calendars 2026-04-22 10:36:18 +02:00
Tomas Hykel 600499f4e1 [#71645] Revert instance to classic identifiers 2026-04-21 21:09:22 +02:00
Tomas Hykel 56f130d9f2 [#71645] Convert instance to semantic identifiers 2026-04-21 19:34:37 +02:00
Kabiru Mwenja a1ba7735b1 Use formatted_id in InfoLineComponent
The shared info line rendered hard-coded `#<numeric-id>` instead of
respecting the semantic identifier setting. Use WorkPackage#formatted_id
(added alongside the autocompleter/global-search work) so Relations,
hover cards, version widgets, backlogs, meetings, and time tracking
all pick up semantic IDs like "PROJ-42" in semantic mode, "#42" in
classic mode.
2026-04-21 20:11:44 +03:00
Kabiru Mwenja 79d4e67a0d Merge pull request #22718 from opf/feature/73756-adapt-routes-for-project-based-semantic-work-package-identifiers
Make find/exists? resolve semantic work package identifiers
2026-04-21 13:13:54 +03:00
Henriette Darge 22a6d4e8b4 Create rails based split create 2026-04-21 09:15:05 +02:00
Oliver Günther 774e64ca8b Fix back route 2026-04-19 21:10:42 +02:00
Oliver Günther 2898a1d0ff Delete dialog primer 2026-04-19 21:10:41 +02:00
Kabiru Mwenja 462a0f1c78 Replace transparent find_by resolution with ArgumentError guard
find_by(id:) and find_by!(id:) now raise ArgumentError when passed
a semantic identifier string, directing developers to use find() or
the new find_by_display_id() method instead. This avoids silently
altering ActiveRecord's find_by semantics and ensures misuse is
caught in development even when semantic mode is not enabled locally.

Renames find_by_id_or_identifier to find_by_display_id (public API)
and migrates all app callers that receive user-facing strings to use
the new method.
2026-04-17 18:17:15 +03:00
Tomas Hykel 3a7fad89df [#73711] refactor: Rename the project identifier namespace 2026-04-16 21:40:38 +02:00
Kabiru Mwenja a898486c3a Override find_by/find_by! for semantic ID resolution
Add find_by and find_by! overrides to FinderMethods so that
find_by(id: "PROJ-42") transparently resolves semantic identifiers,
matching the existing behavior of find and exists?.

Only intercepts calls where id: is the sole keyword — all other
find_by usage (e.g. find_by(subject: ...)) passes through unchanged.

Revert ShowComponent, SplitViewComponent, and WorkPackagesController
from the explicit find_by_id_or_identifier back to standard
find_by(id:) now that the override handles semantic resolution.

Make find_by_id_or_identifier and find_by_id_or_identifier! private
since they are now internal implementation details with no external
callers. Move their test coverage into the find_by/find_by! specs.
2026-04-15 15:54:48 +03:00
Alexander Brandon Coles 70712c4587 Merge remote-tracking branch 'opf/dev' into merge-release/17.3-20260414173706
# Conflicts:
#	config/locales/crowdin/ru.yml
#	modules/wikis/config/locales/crowdin/ru.yml
2026-04-14 18:52:37 +01: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
Ivan Kuchin 41cee7a35f close action doesn't need explicit target: _top is for stimulus, not turbo 2026-04-13 18:26:00 +02:00
Kabiru Mwenja d3734a7485 Rename work_packages_identifier setting values to "classic" and "semantic"
The setting previously used "numeric" and "alphanumeric" as its allowed
values. Rename them to "classic" and "semantic" to better align with the
product terminology for the work package identifier modes.

Includes a migration to update any stored setting values in the database,
updated constants and helper methods on Setting::WorkPackageIdentifier,
and all corresponding references across models, components, forms,
frontend controllers, locales, and specs.
2026-03-28 10:01:57 +03:00
Jan Sandbrink f9d8bc6614 Introduce SubclassResponsibility error
This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.

This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported

Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:

> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]

Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
2026-03-27 08:14:56 +01:00
Henriette Darge d5d88381e7 Move export dialog to the right to grant it more space 2026-03-23 13:21:12 +01:00
Oliver Günther 4d731dcab6 Replace raw and explicit html_safe calls 2026-03-20 09:49:10 +01:00
Kabiru Mwenja e09288dd6a Address code review: rename column, remove padding, split constants, extract error_reason 2026-03-13 17:07:03 +03:00
Kabiru Mwenja e9900dfe2d Rename ProjectHandleSuggestionGenerator to ProjectIdentifierSuggestionGenerator
Aligns the class name and all internal terminology with the domain
language: "handle" → "identifier" throughout. Renames the file, class,
constants (HANDLE_MAX_LENGTH → IDENTIFIER_MAX_LENGTH, FALLBACK_HANDLE →
FALLBACK_IDENTIFIER), public API (suggest_handle → suggest_identifier,
suggested_handle hash key → suggested_identifier), keyword arguments
(in_use_handles → in_use_identifiers, reserved_handles →
reserved_identifiers), and private helper methods accordingly. All
call-sites and specs updated to match.
2026-03-13 16:38:00 +03:00
Kabiru Mwenja 88205c911c Async-fetch confirm dialog via respond_with_dialog
Replace the imperative Stimulus openConfirmDialog action (which pre-rendered
the dialog in the page and called showModal() via JS) with the idiomatic
Hotwire approach: a GET endpoint that streams the dialog on demand.

- Add confirm_dialog route and controller action using respond_with_dialog
- Include OpTurbo::Streamable in ChangeIdentifiersDialogComponent
- Convert autofix button to a link with data-turbo-stream pointing to the
  new route; remove static dialog render from the form template
- Remove openConfirmDialog method from the Stimulus controller
- Update specs to use click_on and raw English strings instead of I18n.t()

Relates to #72461
2026-03-09 08:45:29 +03:00
Kabiru Mwenja 17d417e014 Merge branch 'dev' into implementation/72461-administration-setting-for-sematic-work-package-identifiers-ui 2026-03-07 15:49:38 +03:00
Kabiru Mwenja 36514d9571 Address code review concerns for identifier settings UI
- Move DISPLAY_COUNT constant from IdentifierAutofixSectionComponent to
  PreviewQuery, eliminating a service-layer dependency on a view component.
  The component now forwards to PreviewQuery::DISPLAY_COUNT.

- Guard PreviewQuery.new.call to only run in the :edit state.
  Previously it executed on every render, hitting the DB twice per
  Hotwire status-poll during the :change_in_progress phase.

- Replace nil guard in error_label with I18n.t default: "" to cover
  any unrecognised error reason, not just nil.

- Add component spec for IdentifierSettingsFormComponent covering all
  three states (:change_in_progress, :completed, :edit) including the
  autofix-section visibility branch.

- Update preview_query_spec to reference PreviewQuery::DISPLAY_COUNT
  directly instead of the UI component constant.
2026-03-07 14:17:29 +03:00
Kabiru Mwenja 7a7f9261c6 Fix state-machine bugs in identifier settings form
- Swap wrapper_data_attrs condition: poll-for-changes must only be
  active in :change_in_progress state, not :edit/:completed
- Replace update_to_alphanumeric? with autofix_requested? keyed on
  confirm_dangerous_action param (DangerDialog checkbox signal)
- Use ActiveRecord::Type::Boolean cast for truthy check
- Fix spec: radio group label renders as <legend>, not <h2>; add
  visible: :all for hidden element assertion
2026-03-07 12:54:23 +03:00
Kabiru Mwenja a5ea92db04 Unify identifier settings form into single state-machine component
Replace the two-component approach (IdentifierSettingsFormComponent +
IdentifierChangeInProgressComponent) with a single component cycling
through three lifecycle states: :edit, :change_in_progress, :completed.
2026-03-06 09:21:17 +03:00
Kabiru Mwenja f1655e953c Extract PreviewQuery, collapse error_label, remove unused ERROR_REASONS 2026-03-05 12:24:35 +03:00
Kabiru Mwenja b54d9dccc1 Remove excess comments 2026-03-05 11:58:13 +03:00
Kabiru Mwenja 180a17a99a Extend handle generator with in_use/reserved reasons and performance-aware preview 2026-03-05 11:53:25 +03:00