Making select lists dependent doesn't work?

Created on 6 February 2025, about 2 months ago

Problem/Motivation

Trying to make a select list field required based on workflow state with this module doesn't seem to work. It's unclear if the module is doing something wrong, or if the underlying Drupal API doesn't support this case.

Steps to reproduce

  1. Create a select list field on an entity type with a workflow.
  2. Configure this field using the third-party settings the Workflow Required by State module introduces.
  3. Create an entity of the configured type, and set it to be in the appropriate workflow state.
  4. Observe that, upon editing the entity in the correct workflow state, the select list field is not set as required.
    1. Note that the States API settings appear to have been injected "correctly" into the element (in the same way it works for regular text fields), but they do not appear to take effect the same way. I'm unsure whether this is a deficiency in the States API, or if we were to distinguish field type in our module, we could handle this case properly.

      Proposed resolution

      TBD

      Remaining tasks

  • Add a test select list field and Behat feature to demonstrate the failing behaviour
  • Identify whether there is a fix or existing issue in core that allows this functionality to work correctly
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada spiderman Halifax, NS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024