NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11383 for general documentation changes for release 1.1.5. Use Item9693 for docu changes for release 2.0.

Item4423: SpreadSheetPlugin calculations do not execute within CommentPlugin templates

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Enhancement Closed Extension CommentPlugin  
Marked as Urgent because both CommentPlugin and SpreadSheetPlugin are default plugins. See also: TWiki:Support.DynamicDoubleBracketLink

Steps to Reproduce

1. add the following to UserCommentsTemplate

Add Checklist Item

%TMPL:DEF{PROMPT:checklist_table}%
%TABLE{ valign="top" }%
| Add Checklist Item ||||||||
| *Status* <br/> <input %DISABLED% type="hidden" size="16" name="clitem_id" value="%SERVERTIME{$year$month$day$hour$min$sec}%" />%N% | *To Do* <br /> <input type="text" size="30" name="to_do" value="" /> | *Comment* <br /> <input type="text" size="50" name="comment" value="" /> |  <input %DISABLED% type="submit" value="%button|Add New Entry%" /> <br/> %CALC{"$IF($EXISTS(%WEB%.%TOPIC%ChecklistItemState), [[%TOPIC%ChecklistItemState][maintain states]], )"}% |
%TMPL:END%

%TMPL:DEF{OUTPUT:checklist_table}%| %CLI{id="%URLPARAM{"clitem_id"}%"}% | %URLPARAM{"to_do"}% | %URLPARAM{"comment"}% |%POS:BEFORE%
%TMPL:END%

2. use the comment template as follows

%COMMENT{type="checklist_table"}%

3. observe the problem

The following appears in the template (instead of the result of the "if exists" test):

%CALC{"$IF($EXISTS(CheckListT…tItemState), maintain states, )"}%

-- TWiki:Main/KeithHelfrich - 27 Jul 2007

What on earth is %CLI? AFAIK that's nothing to do with either plugin, nor the core.

-- TWiki:Main.CrawfordCurrie - 27 Jul 2007

Hi Crawford, a %CLI is from the TWiki:Plugins.ChecklistPlugin. Does it's existence in the template mean that the bug is invalid ?

-- TWiki:Main.KeithHelfrich - 03 Aug 2007

The question is if you also have the bug when you do not have the %CLI in the template.

It is a bit of a task having to install ChecklistPlugin to verify your problem.

-- TWiki:Main.KennethLavrsen - 27 Aug 2007

Bug confirmed.

See Item4423Test?

Release blocker? Borderline I would say.

-- TWiki:Main.KennethLavrsen - 27 Aug 2007

We have been discussing back and forth a few times on which tags CommentPlugin should expand up front and which it should delay.

As I remember it we have sometimes ended up in it being a feature request to be able to state explicitely which tags are wished expanded at comment time and which are not.

Not a release blocker, more of a feature request / wish for functionality. Should be discussed in a Codev topic imho.

-- TWiki:Main.SteffenPoulsen - 27 Aug 2007

I agree it is not a release blocker.

Steffen do we have a Codev topic that already covers this?

And to anyone - is there a workaround that Keith can use?

-- TWiki:Main.KennethLavrsen - 27 Aug 2007

TWiki:Plugins.CommentPluginDev has a little discussion and a few workarounds (along the lines of pre-calculating needed values and putting them in a variable up front).

-- TWiki:Main.SteffenPoulsen - 27 Aug 2007

Pretty sure this is cured by eliminating commonSlagsHandler

-- CrawfordCurrie - 07 Sep 2010

ItemTemplate edit

Summary SpreadSheetPlugin calculations do not execute within CommentPlugin templates
ReportedBy TWiki:Main.KeithHelfrich
Codebase
SVN Range TWiki-4.1.2, Thu, 19 Jul 2007, build 14438
AppliesTo Extension
Component CommentPlugin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins Foswikirev:8955
TargetRelease minor
ReleasedIn 1.1.1
Topic revision: r11 - 04 Oct 2010 - 18:38:43 - KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads