Tags:
create new tag
view all tags

Question

Hello!

We are using the Action Tracker plugin with a comment box (see CommentPluginTemplate. When you add an Action Item using the Comment box, the most recently added item is appended to the list, but it is formatted differently than all of the other items. The lines below show the penultimate and last Action Items:

%ACTION{ created="2008-07-25" creator="OurTWiki.NinaGlatt" due="" filename="test 1" priority="Normal" state="open" uid="000146" who="OurTWiki.NinaGlatt" }% this is the first item %ENDACTION% 
%ACTION{filename="test 2" priority="Normal" creator="OurTWiki.NinaGlatt" created="2008/07/25" state="open"}% this is the second item %ENDACTION%

As you can see, the second action item has not yet been assigned a UID. This changes once a third item is added:

%ACTION{ created="2008-07-25" creator="OurTWiki.NinaGlatt" due="" filename="test 1" priority="Normal" state="open" uid="000146" who="OurTWiki.NinaGlatt" }% this is the first item %ENDACTION% 
%ACTION{ created="2008-07-25" creator="OurTWiki.NinaGlatt" due="" filename="test 2" priority="Normal" state="open" uid="000147" who="OurTWiki.NinaGlatt" }% this is the second item %ENDACTION% 
%ACTION{filename="test 3" priority="Normal" creator="OurTWiki.NinaGlatt" created="2008/07/25" state="open"}% this is the third item %ENDACTION% 

So it seems the last item in the list never receives a UID. This causes the action item to display improperly: the state field does not appear in a drop-down box (just as text), and it is not editable using the in-table "edit" button.

I believe the last item does not receive an UID because, as it states in ActionTrackerPlugin, the UID is generated when the action is first saved. In fact, if the topic is edited and saved (without modifying anything), the last item gets a UID. Since we are appending items to the list using a comment box, doesn't that skip the usual edit-save cycle? If that is true, is this why there is no UID being assigned to the item?

Is there a way to append action items using a comment box and to have the last item receive a UID?

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: ActionTrackerPlugin CommentPlugin, EditTablePlugin, SlideShowPlugin, SpreadSheetPlugin, TablePlugin, TocPlugin, TreePlugin, WysiwygPlugin
Server OS: Win XP
Web server:  
Perl version:  
Client OS: Windows XP SP2
Web Browser: Firefox 3.0
Categories: Plugins

-- NinaGlatt - 25 Jul 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Due to a code change with TWiki 4.2, adding an action item with a comment form requires that the comment plug-in be interpreted before ActionTracker (reported in TWikibug:Item5615). This is set in the configuration screen (or \TWiki\lib\LocalSite.cfg):

$TWiki::cfg{PluginsOrder} = 'SpreadSheetPlugin,CommentPlugin';

-- SeanCMorgan - 28 Jul 2008

Thank you!

-- NinaGlatt - 29 Jul 2008

Hello, I was having the same problem (with Twiki 4.12, but otherwise similar setup) and setting the plugin order fixed it. Thank you! However, I have a problem now where the very first comment created does not get assigned a uid (uid="")-- but all others added afterward get assigned one.

To clarify, the first comment added was never getting assigned a uid, but neither was the most recent one. Now the most recent one is, but the first one is still not.

Anything else I should check?

-- KathyDeLaCruz - 31 Jul 2008

OK, I figured out my problem - I had been copying code around, without paying attention to exactly what I was copying. The template output I had included uid="" -- and after taking this out, it works like a charm wink

Before:

%TMPL:DEF{OUTPUT:myaction}%%POS:BEFORE%%ACTION{actionedtype="%URLPARAM{"action_type"}%" created="%SERVERTIME%" uid="" ...

After:

%TMPL:DEF{OUTPUT:myaction}%%POS:BEFORE%%ACTION{actionedtype="%URLPARAM{"action_type"}%" created="%SERVERTIME%"  ...

-- KathyDeLaCruz - 04 Aug 2008

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2008-08-04 - KathyDeLaCruz
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.