Item2425: If DataForm is changed during a state transition, and the user cancels the edit, the topic state changes, but the form data does not save.

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: WorkflowPlugin
Branches:
Reported By: DeanSpicer
Waiting For:
Last Change By: CrawfordCurrie
Consider a topic in "State A" that is being transitioned to "State B" with a form change that has autofilled mandatory label-type fields. Once the user pushes the button to begin the transition, the state of the topic changes....then the edit view opens with the new form. If the user panics and cancels the edit....the form data will not be saved with the topic. This leaves the topic in "State B" with none of the mandatory data saved. Since the mandatory data was autofilled (things like UserName and ServerTime) and is set to label type, the user cannot correct the mistake by simply editting the topic again.

To correct these situations, intervention from an admin is needed.

The real fix (IMHO) is to have the state change occur after the topic (with new DataForm) is saved.

Crawford, you mentioned once that you may know how to fix this problem properly. If that is the case, I would pay for this work to be done....this bug bites me on a regular basis.

-- DeanSpicer - 28 Nov 2009

This is a known problem, because the handlers that deal with the state change require to edit an existing topic. The only solution is to delay the state change until the topic is saved, but there are all sorts of issues with that; you basically have to pass along a packet of information describing what the state change is all about for processing in the beforeSaveHandler. I haven't worked out all the details, but it isn't trivial.

-- CrawfordCurrie - 01 Feb 2010

Finally got round to doing this.

-- CrawfordCurrie - 22 May 2010

ItemTemplate edit

Summary If DataForm is changed during a state transition, and the user cancels the edit, the topic state changes, but the form data does not save.
ReportedBy DeanSpicer
Codebase
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component WorkflowPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins WorkflowPlugin:0ea8ed5c0cbe
TargetRelease n/a
ReleasedIn
Topic revision: r5 - 22 May 2010, CrawfordCurrie - This page was cached on 16 Sep 2021 - 14:58.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy