Refactors the custom `:list`/`:list_item` selectors onto CAS's
`add_role_selector` and drops the now-native `Capybara::Node::Simple#role`
hack. `:list_item` resolves the listitem role, so specs matching
non-listitem `<li>` are updated (`have_row` for the custom field table,
presentation dividers via CSS).
CAS 0.16 also resolves role selectors by computed role and accessible
name, which our CSS-styled tables and Primer menus do not expose through
plain markup. Affected feature specs switch to robust locators:
Capybara's `:table_row`, the FullCalendar `data-date`, and the action
menu's real accessible name ("Edit status").
The `:columnheader` `colindex` filter lost its off-by-one offset and now
uses the true 1-based `th` position. Also fixes Webhooks `RowComponent`
spec capitalization.
Replaces jQuery-based enable/disable logic in the webhooks admin form
with a new Stimulus controller `disable-when-value-selected`.
This change was originally deferred from PR #20884 as it was planned to
be addressed in Work Package #69436 / PR #21227. Since that work has
been put on hold and jQuery removal is progressing, this commit
completes the migration now.
Changes:
- Add DisableWhenValueSelectedController for declarative form toggling
- Add toggleEnabled/enableElement/disableElement helpers to dom-helpers
- Remove jQuery code from webhooks admin form
- Apply Stimulus controller to project selection fieldset
Related to opf/openproject#20884https://community.openproject.org/wp/68734
* Fix GitHub/NoTitleAttribute, LinkHasHref errors
- Replaces `title` attribute with `aria-label` for interactive elements.
- Removes `title` from non-interactive elements.
- Converts `<a>` tags without proper `href` to `<button>` elements,
using Primer `Button`/`IconButton` where possible.
# Conflicts:
# app/views/custom_fields/_custom_options.html.erb
# spec/features/admin/custom_fields/shared_custom_field_expectations.rb
# spec/features/admin/custom_fields/work_packages/list_spec.rb
* Fix Autocomplete missing errors
* Fix GitHub/NoPositiveTabIndex errors
Removes all positive `tabindex` values.
* Fix Rails/LinkToBlank errors
* Replace toast with Primer Banner on LDAP form
* Add frozen_string_literal
* Ignore erb lint for deprecated files
* Fix linting errors in repository module
* Fix linting errors in budgets and custom actions
* Fix linting errors in member form and 2fa
* Fix linting errors in mcost types and wiki help and storages
* Fix linting errors in multi select filters, ifc viewer, and unsupported browser banner
* Fix failing spec
* Use Primer banner instead of op-toast where ever it is possible
* Use octicon instead of op_icon
* Fix failing tests
* Use no-decoration-on-hover for button links and change the button with only an icon to primer icon button
* Keep webhook response modal activation selector class-based
* use icon button for edit of hourly rate
---------
Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
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
Those were too small for me to point out and thus block the
corresponding PR further. But I wanted to address them anyways:
* actor should be exposed the same way as resource for consistency
* usage of actor can be simplified
* one regression test didn't need repetition for actor case
Move actor resolution to the caller and actor representation to
RepresentedWebhookJob, keeping WorkPackageWebhookJob simple.
The caller extracts the actor from the journal and passes it as
an optional `actor:` keyword argument, making the feature available
to all webhook types without changing existing method signatures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Work package webhooks now include a top-level `actor` field identifying
the user who triggered the event (the journal author), separate from the
work package's `author` (the original creator).
{
"action": "work_package:updated",
"actor": { "id": 5, "name": "Jane Smith", "_type": "User", ... },
"work_package": { ... }
}
The representer continues to use User.system for payload generation,
preserving custom field visibility. The actor is sourced from the
journal passed to WorkPackageWebhookJob.
Resolves: https://community.openproject.org/wp/69658
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>