This question about Using an extension: Answered

Search on open comments


I have added a comment section to all my topics by using the Comment plugin

This is an example of my layout

Comment Severity Status Submitted By & Date
Section 3 needs to have the links updated Medium Open PeterSvendsen 28 Nov 2012
Colour code not correct in section 6 </br> After analysis issue found - must be updated in next version Low Analysed TimKurt 01 Jun 2012
And another open task Medium Open PeterSvendsen 28 Nov 2012

Now I would like to create a overview of all open comments, so I have created a topic where I would like to have a search function reporting all comments with the state "Open" and it should be presented some thing like this

Topic comment relates to Severity Submitter & Date Comment

Any one have a good proposal how this could be done? I have not been able to solve this issue :/

-- PeterSvendsen - 28 Nov 2012

Have you looked at the ActionTrackerPlugin? Or maybe the WorkflowPlugin or ApprovalPlugin? I think for logging actions against a topic to ensure follow-up, that ActionTracker is probably the closest.

-- GeorgeClark - 28 Nov 2012

fundamentally, yes, this is an application where you should be transitioning to making a DataForm based application, and writing a conversion script :/

however, it should be possible to make a SEARCH that looks for your comment table heading, and then format using $pattern() that looks for tables that contain open...

this is not an optimal solution, both for speed reasons, and because it will fail if the table isn't perfect, but possible

-- SvenDowideit - 28 Nov 2012

Hi Both,

Sorry for the late answer.

GeorgeClark: I have used the commentplugin and made a comment field in the buttom of all topics and this has been used for 1 year now and I have already quite a lot of comments so in my point of view its a no go to change now. I also have far to many topics to do that, it would take a lot of time to do frown, sad smile

SvenDowideit: How would I make such a search, would you be able to link me to a good example? Because I have tried several times without any good outcome at this stage frown, sad smile

-- PeterSvendsen - 03 Dec 2012

This works. Patterns could probably be a bit improved. But (^\|.*?\|.*?\|.*?\|.*?\|.*) will match the whole line. Each cell is matched by .*?\| So to match a particular cell including the ending |, surround the .*?\| with parenthesis.

Topic comment relates to Severity Submitter & Date Comment
Question1205 Medium PeterSvendsen 28 Nov 2012 Section 3 needs to have the links updated
Question1205 Medium PeterSvendsen 28 Nov 2012 And another open task

| *Topic comment relates to* | *Severity* | *Submitter & Date* | *Comment* |
%SEARCH{"\| Open \|" type="regex" topic="Question1205" multiple="on" nonoise="on" format="| $topic |$pattern(^\|.*?\|(.*?\|).*)$pattern(^\|.*?\|.*?\|.*?\|(.*?\|).*)$pattern(^\|(.*?\|).*) " }%

-- GeorgeClark - 03 Dec 2012

Oops. Tweaked the example a bit. Need to use $topic, not %TOPIC, so that it show the topic found in the search. If the search is for a different web, it should be $web.$topic.

Also shifted over the $pattern. It matches the leading space in the cell, so adding an extra space right justifies the resulting cell.

-- GeorgeClark - 04 Dec 2012

Hi GeorgeClark, This is just perfect, it works very well. Thanks a lot for your help.

BR, Peter

-- PeterSvendsen - 05 Dec 2012

QuestionForm edit

Subject Using an extension
Extension CommentPlugin
Version Foswiki 1.1.5
Status Answered
Related Topics
Topic revision: r7 - 05 Dec 2012, PeterSvendsen - This page was cached on 14 Jan 2018 - 19:49.

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