Veto transition based on config

Created on 19 August 2025, about 1 month ago

Problem/Motivation

It seems like an obvious next step that this module also block workflow transitions based on the field configurations. I'm quite surprised this hasn't been introduced already. If a field is required when a product is "Validated", then surely it should veto the transition to "Validated" if a required field hasn't been filled in. Has there been no plans or need for this previously? I need it so might create a MR to introduce it.

Proposed resolution

I think, to maintain existing usage of this module and flexibility, there should be a config flag to enable and disable this functionality.

By the looks of it there is no general configuration form for this module, yet it seems to me that it would be a little inefficient to set a flag in every single field to decide if the workflow should be vetoed or not. I propose creating a generic configuration form for this.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain willeaton

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

Merge Requests

Comments & Activities

  • Issue created by @willeaton
  • Merge request !2Add option to veto workflow transition → (Open) created by willeaton
  • Pipeline finished with Failed
    about 1 month ago
    Total: 216s
    #578332
  • 🇪🇸Spain willeaton

    OK, I have a working version however there are a few things to take into account:

    - The version 1.8 of the Workflow module is very out of date and actually doesn't work properly. It's not possible to veto a workflow transition due to a very old bug
    - This module now requires 2.x of Workflow and the composer.json file has been updated accordingly
    - It's difficult to get composer to work because I can't seem to get composer to require my branch/fork therefore it finds the Workflow requirement of 1.8 and won't let me have Workflow 2.x installed locally. To get around this I had to declare the git repo before drupal.org packages (more info below).
    - I have refactored the deprecated code and it seems to work.
    - I have not tested an entity having multiple workflow fields, this isn't something that applies to me, however I tried to take it into account.
    - To test the veto functionality, you need to activate the option in the new module config form.
    - This module is missing a 1.x-dev branch for checking out when developing. It helps...

  • Pipeline finished with Failed
    26 days ago
    Total: 595s
    #581804
  • Pipeline finished with Failed
    17 days ago
    Total: 183s
    #589779
Production build 0.71.5 2024