90 Commits

Author SHA1 Message Date
Tomas Hykel 07eca6d8cd [STC-337] Fix rendered date of edited comments 2026-06-12 16:37:36 +02:00
Tomas Hykel dca5065e56 Add "Beta" to semantic identifier setting page 2026-05-29 10:30:29 +02:00
Tomas Hykel 948fa43321 chore: Remove feature flag for project-based work package identifiers 2026-05-25 17:45:06 +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
OpenProject Actions CI 6f8a56ec02 Merge branch 'release/17.4' into dev 2026-05-12 13:36:07 +00:00
Henriette Darge 73615871ad Change wording slightly 2026-05-12 08:47:16 +02:00
Behrokh Satarnejad 3bc9c7f5d3 Add a spec for the bulk delete 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 78dfd4df81 Add classic-mode coverage to tab component full-screen link spec 2026-04-28 08:58:24 +03:00
Kabiru Mwenja 8fe952bfea Switch tab component spec to with_flag/with_settings metadata
Stubbing Setting::WorkPackageIdentifier predicates bypasses the real
flag + setting resolution chain. Flip the actual flag and setting via
RSpec metadata so the spec exercises the real guard path.
2026-04-28 08:58:23 +03: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
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 54ba86e230 Add component spec for InfoLineComponent formatted_id display
Covers semantic mode, semantic-mode-with-nil-identifier fallback, and
classic mode. Also exercises the pre-existing rendering paths (type,
status, link) that previously had no component-level coverage.
2026-04-21 20:11:47 +03:00
Tomas Hykel 3a7fad89df [#73711] refactor: Rename the project identifier namespace 2026-04-16 21:40:38 +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
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 0f38c6d953 Fix component spec: use have_link for autofix button and raw strings
The autofix button is now a link (<a> tag), so update the component spec
to use have_link/have_no_link instead of have_button. Also replace all
I18n.t() calls with raw English strings throughout the spec.
2026-03-09 08:59:48 +03:00
Kabiru Mwenja 1c83d3410b Assert both radio buttons disabled/enabled in identifier settings spec
Previously only the first radio button was checked by label. Now both
"Instance-wide numerical sequence" and "Project-based alphanumerical
identifiers" are asserted for completeness.
2026-03-09 08:51:12 +03:00
Kabiru Mwenja 5a73898c9b Use accessible selectors and raw strings in identifier settings specs
Replace CSS role selectors with capybara_accessible_selectors helpers
and substitute raw English strings for I18n.t() calls where the value
serves as a contract on the exact locale text.
2026-03-07 15:45:37 +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 f1655e953c Extract PreviewQuery, collapse error_label, remove unused ERROR_REASONS 2026-03-05 12:24:35 +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
Kabiru Mwenja d7d9c84f39 Rename PreviewComponent to SectionComponent; merge banner into it
IdentifierAutofixPreviewComponent → IdentifierAutofixSectionComponent.

The banner (existing_identifiers_notice) and the preview table always appear
together, so they are now co-located in a single component. The parent
template renders one component instead of a banner + separate component.

Changes:
- git mv preview → section for all three files (rb, erb, spec)
- Add @total_count to the initializer for the banner's project_count
- Template: banner rendered above the border-box table
- Parent template: remove inline banner render, call SectionComponent
- Spec: update described_class; add banner count assertion
2026-02-25 23:07:45 +03:00
Kabiru Mwenja d38006c0d3 Show realistic example WP IDs in autofix preview table
Replace the hardcoded '-1' suffix with a deterministic sample number
derived from the handle string (range 1–500, zero-padded for single
digits). Each handle consistently produces the same example ID on every
render, but IDs look naturally varied across different projects.
2026-02-25 22:37:10 +03:00
Kabiru Mwenja 08f1e2992a Add identifier admin settings UI with autofix preview
Adds the admin settings page for choosing between numeric and
project-based alphanumeric work package identifiers (#72461):

- ProjectHandleSuggestionGenerator service that scans projects for
  identifiers that don't meet alphanumeric handle requirements and
  generates uppercase acronym suggestions (e.g. "PROJ" from "My Project")
- IdentifierAutofixPreviewComponent: Primer BorderBox table showing the
  first 5 problematic projects with their suggestions and a "... N more"
  footer row
- work-packages-identifier Stimulus controller that shows/hides the
  autofix section and updates the submit button label on radio change
- Updated IdentifierSettingsFormComponent wired to the Stimulus
  controller, showing the warning banner and preview table when
  "Project-based alphanumerical identifiers" is selected
2026-02-25 22:27:25 +03:00
Oliver Günther c84dd850fa Refactor static links to ensure users have to go through url_for
This ensures links will be translated if they are part of the website
2025-09-09 13:43:26 +02:00
Klaus Zanders 68dfbee629 Be more lenient in the fields passed to the modal
When we do focus another input field on the page, the debounced preview logic kicks in and passes the fields name to the `frmaeSrc`. Since the search field is not whitelisted, we are throwing an argument error. This seems a bit strict.
The new logic accepts all field values. The modal is closed immediately afterwards anyways and this cancels the loading.
2025-09-01 17:21:27 +02:00
Pavel Balashou 7f284ca37e Merge branch 'feature/62107-add-scim-server-api' into scim-authentication 2025-07-01 10:03:06 +02:00
Pavel Balashou e78b12a51e [#62107] Fix specs. Add openjdk to backend image.
- Add openjdk to backend image.
  It is required to sping up test LDAP server in specs.
  https://github.com/NUARIG/ladle
2025-06-30 17:50:39 +02:00
Eric Schubert e36d115295 [#65242] moved most of the wp types related files to new namespace
- https://community.openproject.org/work_packages/65242
- moved a lot of classes under ::Types or ::WorkPackages::Types to
  ::WorkPackageTypes namespace
2025-06-30 13:31:39 +02:00
Kabiru Mwenja 69fd55dd5e Add unit tests for reminder modal body component 2025-05-29 14:22:10 +03:00
Behrokh Satarnejad 9b5fedb1ce [62708] Implementing ARIA live regions to communicate contextual changes (#17920)
* check if there is a screen reader active on page load

* hide the flat picker for screen readers

* make the banner focusable

* change the focus color in banner

* change disabled to readonly input fields

* change replace_via_turbo_stream to add a message to it

* add live region of github to out project

* add a method to send the aria message

* make it possible to pass the attributes

* pass type of aria live region to front-end based on the action

* remove focused field from date picker

* focus on tabs when there is no banner

* Revert "remove focused field from date picker"

This reverts commit ab5e3060343860e9c34514818f6d9eee59e91ee1.

* focus on the first element when opening the dialog

* remove auto-focus

* undo changes for adding a message

* add a new input method for adding a date and select today as a date

* remove label and name from form input

* change readonly to disabled

* undo changes for date-form

* delete dateform file

* add aria-live for fields in date pickr

* add a turbo stream to the component to load the messages for aria live regions

* undo changes for check f there is an active screen reader

* use settimeout instead of add event listener, so turbo frame also can be used hare

* undo changes for text with link form input

* remove text with link form input

* add documentation for aria-live region

* add an example for using current method in relation creation

* add aria live region in date-pickr dialog

* add some delay for polite messages to make sure it is caught

* send a message to be gotten by screen reader in date picker while changing inputs

* remove aria-live form inputs in date pickr

* show update message after any change in inputs of date picker

* fix rubocup errors in relation controller

* fix rubocup errors in datepicker controller

* fix eslint error

* update docs

* add some details to the aria live doc

* remove test for aria-live on inputs of date pickr

* remove unnecessary live region polite for date picker

* Update lookbook/docs/patterns/18-aria-live.md.erb

Co-authored-by: Henriette Darge <h.darge@openproject.com>

* Update lookbook/docs/patterns/18-aria-live.md.erb

Co-authored-by: Henriette Darge <h.darge@openproject.com>

* fix comment in preview controller

* remove role: alert

* set correct value for target

* move aria turbo stream below live region

* add missing spaces and a better headline for js handling turbo aria action

* move the exception of modals and dialogs to the end of doc file

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update frontend/src/turbo/aria-stream-action.ts

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/work_packages/date_picker_controller.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/concerns/op_turbo/component_stream.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/work_packages/date_picker_controller.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/work_packages/date_picker_controller.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* change parameter in update_inputs_aria_live_message string

* change type to politeness

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* set delay for polite updates

* use delay in relations tab update and date pickr update

* remove the usage of aria live region update message in relations tab, since we should handle update message here in another way

* use assistive technology instead of screen reader only

* change the stream action to live region

* change the aria action to live region

* remove alert role

* change the string in away that if there is no value for start date, finish date or duration, it shouldn't be part of the string

* remove aria-live from input text fields

* test for updated message in date pickr

* undo changes for relations updates

* check if message is null then return

* add more delay for updating data in date picker

* fix test for adding more delay for updating data in date picker

---------

Co-authored-by: Henriette Darge <h.darge@openproject.com>
Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>
2025-05-21 13:08:21 +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
Jan Sandbrink 34277ebf4e Consistently use enterprise_banner test helper
Also using it in negative test assertion and specifically
requiring an enterprise banner for a plan when it is present.
2025-04-25 08:50:50 +02:00
Christophe Bliard 6d2b4808f7 refactor: name routes after DatePickerController's name
Having the route being `datepicker_dialog_content` leads to looking for
a `DatepickerDialogContentController`, but that would be wrong as the
controller is `DatePickerController`. That's not coherent. That's why
routes were moved to `date_picker` so that the routes and the controller
are named the same

Also moved the `new` action to the collection level so that it does not
need a dummy `work_package_id` with value `new` anymore.
2025-04-16 09:16:31 +02:00
Oliver Günther 18574696f5 Fix specs 2025-04-07 10:55:25 +02:00
Oliver Günther dc369872e8 Fix specs 2025-04-07 10:55:23 +02:00
Behrokh Satarnejad 3f8b73cec0 [60904] Accessibility for new datepicker (#18492)
* add aria live region for inputs

* add aria live region for finish date

* change the way we use aria-live

* add test to check if there is aria live set for datepickr inputs

* fix line too long issue

* Update spec/components/work_packages/date_picker/dialog_content_component_spec.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

---------

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>
2025-04-01 19:28:10 +02:00
Henriette Darge f0c723ae43 Allow editing the finish date in automatic scheduling mode 2025-03-31 08:27:17 +02:00
Christophe Bliard 4d5c600a95 [61960] Can now select automatic scheduling for new work packages
It will disable the save button and display the message explaining that
there are no predecessors, but at least it's consistent with the bahvior
with persisted work packages.

https://community.openproject.org/wp/61960
2025-03-20 17:48:28 +01:00
Eric Schubert 26832f40ef Merge pull request #18101 from opf/bug/61619-preserve-form-state-on-submit-failure
[#61619] keep form values on submit failure
2025-03-04 16:38:24 +01:00
Eric Schubert 2896eb4748 [#61619] do not use params in view component
- params are deconstructed in template
- view component got defined ctor interface for form data
2025-02-28 15:28:16 +01:00
Eric Schubert 27b9c4e5d6 [#61619] added component test
- still with rubocop issue
2025-02-28 10:38:48 +01:00