entity field state actions don't validate the entity

Created on 31 December 2023, about 1 year ago
Updated 28 March 2024, 10 months ago

Problem/Motivation

Changes to an entity should be validated.

This is going to require some refactoring.

First, does this belong in checkReachable() or checkOperability()?

- checkOperability doesn't concern itself with direction, so probably not
- checkReachable doesn't call through to the state action plugin, but it does call getNextStateName() on the plugin

Maybe this should be handled in getNextStateName() -- the new value is calculated there anyway, so in addition:

1. set it on the entity
2. try to validate

If validation fails, then in fact the attempted value is NOT a valid next state. Therefore return NULL, and that gets back to checkReachable().

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Production build 0.71.5 2024