Remove raw DB queries in AssignOwnerNode::buildConfigurationForm() and always use autocomplete

Created on 7 August 2020, over 4 years ago
Updated 30 January 2023, over 2 years ago

Problem/Motivation

Drupal\node\Plugin\Action\AssignOwnerNode::buildConfigurationForm() does direct DB queries against {users} and friends to figure out if it should use an autocomplete or a select to pick the user you're targeting in the action.

As @berdir pointed out at #2830504-45: AssignOwnerNode allows assigning to anonymous users due to misspelling of key #selection_settings โ†’

Other places don't do this either, the node edit form is always an autocomplete, so why bother with this?

Steps to reproduce

Open core/modules/node/src/Plugin/Action/AssignOwnerNode.php and scroll down to buildConfigurationForm().

Proposed resolution

Kill that conditional and always use an autocomplete.

Remaining tasks

  1. Do it.
  2. Remove weird user creation mess in testAssignOwnerNodeActionConfiguration()
  3. Reviews / refinements.
  4. RTBC.
  5. Commit.

User interface changes

Username for AssignOwnerNode configuration form will always be an autocomplete, even on sites with less than 200 users.

API changes

N/A

Data model changes

N/A

Release notes snippet

TBD.

๐Ÿ“Œ Task
Status

Needs work

Version

10.1 โœจ

Component
Node systemย  โ†’

Last updated about 15 hours ago

No maintainer
Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States dww

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs screenshots

    The change alters the user interface, so before and after screenshots should be added to document the UI change. Make sure to capture the relevant region only. Use a tool such as Aviary on Windows or Skitch on Mac OS X.

  • Needs product manager review

    It is used to alert the product manager core committer(s) that an issue represents a significant new feature, UI change, or change to the "user experience" of Drupal, and their signoff is needed. If an issue significantly affects the usability of Drupal, use Needs usability review instead (see the governance policy draft for more information).

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024