Item10615: ActionTrackerPlugin does not update due date
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
If you have defined one or more custom fields for your ACTIONs with ACTIONTRACKERPLUGIN_EXTRAS, but do not include some of them in ACTIONTRACKERPLUGIN_EDITHEADER, the ACTION's edit form breaks. It includes the respective fields as hidden, assigning (at least one of) them a value that looks like an html-encoded version of a form. If you save the edit form, this field is recorded with the value
"<form method="
. Any changes to the due date are lost, changes to any other fields are saved.
Details: If I add a
select named
todo with options
löschen,
überarbeiten,
OK to the ACTIONTRACKERPLUGIN_EXTRAS but do not include it in ACTIONTRACKERPLUGIN_EDITHEADER, my ACTION's edit form includes the following hidden field:
<input type="hidden" name="todo" value="<form method="post" action="%SCRIPTURLPATH{rest}%/ActionTrackerPlugin/update" enctype="multipart/form-data"> <input type="hidden" name="topic" value="Sandbox.UserFragen" /><input type="hidden" name="uid" value="000223" /><input type="hidden" name="field" value="todo" /><input type="hidden" name="value" value="" /><select name="todo" class="atp_update userval" size="1"><option value="NuLL" selected="selected"></option><option value=""></option><option value="überarbeiten">überarbeiten</option><option value="löschen">löschen</option><option value="OK">OK</option></select> </form>" />
--
KerstinPuschke - 08 Apr 2011
Argh. Confirmed.
--
CrawfordCurrie - 18 May 2011
The problem was limited to select types, so was quite restricted in scope. Fixed.
--
CrawfordCurrie - 18 May 2011
The committed fix introduces a small annoyance where undefined fields cause a warning to be thrown:
[Tue Feb 14 11:28:23 2012] view: Use of uninitialized value in concatenation (.) or string at /some/path/lib/Foswiki/Plugins/ActionTrackerPlugin/Action.pm line 713.
Fixed with a check comparable to the one at the beginning of the function.
--
FlorianSchlichting - 15 Feb 2012