pimcore icon indicating copy to clipboard operation
pimcore copied to clipboard

Workflow issue when "Disable unsaved content warning" is disabled

Open danielerne opened this issue 5 years ago • 1 comments

Expected behavior If a workflow state has an unsaved state, it should show the warning without going to the next step until it is saved.

Actual behavior

If the workflow step is changed without saving the object, it show the save before dialog. After it was saved and trying to do the step again it shows the error: transition is currently not allowed Because the transition was done even without saving the object.

Steps to reproduce

  • Go to user settings and deactivate "Disable unsaved content warning"
  • Do a workflow step with "publish: false" permission and a finish step.
  • Go to this step in the object, do a change without saving and hit the action for the finish step
  • It shows the save before dialog
  • After clicking again the step finish it shows the error

Code example

Workflow yml:

einsatzplan:
            label: 'Einsatzplan'
            type: 'state_machine'
            marking_store:
                type: single_state
                arguments:
                    - state
            enabled: true
            supports:
                - 'Pimcore\Model\DataObject\Einsatzplan'
            initial_place: 'generated'
            places:
                generated:
                    label: 'Plan generiert'
                    color: '#377ea9'
                    permissions:
                        - objectLayout: 1
                          modify: false
                update_content:
                    label: 'Plan aktualisieren'
                    title: 'Updating content step'
                    color: '#d9ef36'
                    permissions:
                        - objectLayout: 2
                          unpublish: false
                          publish: false
                          rename: false
                finish:
                    label: 'Einsatzplan bereit'
                    title: 'Content ready to publish'
                    color: '#28a013'
                    permissions:
                        - objectLayout: 1
                          modify: false
            transitions:
                start_processing:
                    from: generated
                    to: update_content
                    options:
                        label: 'Plan anpassen'
                restart_processing:
                    from: finish
                    to: update_content
                    options:
                        label: 'Plan anpassen'
                content_ready:
                    from: update_content
                    to: finish
                    options:
                        label: 'Veröffentlichen & Benachrichtigen'

danielerne avatar Feb 21 '20 13:02 danielerne

Thanks a lot for reporting the issue. The issue was not considered by us as "Priority" or "Backlog", so we're not gonna work on that anytime soon. In case this is a bug report, please create a pull request fixing the issue, we'll then review it as soon as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request, we'll then decide whether we'd accept it or not. Thanks for your understanding.

stale[bot] avatar Mar 15 '22 04:03 stale[bot]