Problem/Motivation

The workflow code is douplicating a lot of code.
Also, many 'Workflow' settings can be managed via the 'Manage Form Display' settings, where all sub- and attached fields of a workflow transition are listed.
For that, recently some attributes (like 'execute', 'scheduled', are moved to the Field UI.

There is still some to do

Steps to reproduce

Proposed resolution

Add also the timestamp to the 'Manage Form Display' settings. You can choose between 'Timestamp', Timestamp Timezone', widget or hide the widget.
Until now, the settings from the 'Edit workflow' screen take precedence.

Then , on the Node form workflow widget, the widget is compiled by creating a new form element for the Transition object, and parsing the submitted results can also be delegated to core code.

Afterwards, the remaining duplicated, or twice executed code can be removed, too.
(In Initial versions of D8, workflow would duplicate a lot of code)

Remaining tasks

Create update script that removes settings from Workflow Settings.
Create hook to influence the visible/required states of each element.

User interface changes

Additional files on Workflow > Workflow type > Manager Form Display

API changes

Data model changes

Comments

johnv created an issue. See original summary.

  • johnv committed 521f54c6 on 2.1.x
    [#3552010] feat: Manage Transition widget via Workflow 'Form Display'...

  • johnv committed 6cd95986 on 2.1.x
    [#3552010] feat: Manage Transition widget via Workflow 'Form Display'...

  • johnv committed e4bb32dd on 2.1.x
    [#3552010] feat: Manage Transition widget via Workflow 'Form Display'...

  • johnv committed 36c112cf on 2.1.x
    [#3552010] feat: Move WorkflowTransitionForm::retrieveFormElement() to...

  • johnv committed 893c8f72 on 2.1.x
    [#3552010] feat: Remove unneeded 'required' asterisk from to_sid field...

  • johnv committed 182533b8 on 2.1.x
    [#3552010] Reuse code from wiget:;retrieveFormElement and reuse element...

  • johnv committed e4513ccb on 2.1.x
    [#3552010] Apply Widget::createInstance to src/Plugin/Action
    

  • johnv committed 4aa68a3d on 2.1.x
    [#3552010] Better declaration of class WorkflowItem ...  implements...

  • johnv committed 6dd83127 on 2.1.x
    [#3552010] Shorter code in Action
    

  • johnv committed 80ac136f on 2.1.x
    [#3552010] clean code - cspell
    

  • johnv committed a03dbd3c on 2.1.x
    [#3552010] clean code - phpcs
    

  • johnv committed 804a6128 on 2.1.x
    [#3552010] clean code - phpcs
    

  • johnv committed a59a63ea on 2.1.x
    [#3552010] clean code - phpcs
    

  • johnv committed dd1523e0 on 2.1.x
    [#3552010] Reuse code from wiget::retrieveFormElement and reuse element...

  • johnv committed 445ec4aa on 2.1.x
    [#3552010] Reuse code from wiget::retrieveFormElement and reuse element...
johnv’s picture

Status: Active » Fixed

This is now complete, and also the Ajax widgets on Node and WorkflowTransition are working on Node create and Node edit.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.