Use state labels instead of values when showing constraint validation messages.

Created on 25 July 2024, 9 months ago

Problem/Motivation

Currently if a content editor tries to set a publish/unpublish date along with the moderation states which are not valid transitions, they are shown messages which are not very intuitive and use moderation state values instead of using state labels.

PublishStateConstraintValidator and UnPublishStateConstraintValidator should also use state labels similar to TransitionAccessConstraintValidator.

Steps to reproduce

  • Create a node with draft moderation state and a future unpublish date but with no unpublish moderation state.
  • User is shown a message: The scheduled un-publishing state of _none is not a valid transition from the current moderation state of draft for this content.

Expected result: User should be shown a meaningful message which uses moderation state labels instead of using machine names.

Proposed resolution

PublishStateConstraintValidator and UnPublishStateConstraintValidator should also use state labels similar to TransitionAccessConstraintValidator.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India amangrover90

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024