New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Item8704: Improvements for GROUPINFO

Priority: Enhancement
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Reported By: MichaelDaum
Waiting For:
Last Change By: KennethLavrsen
been playing GROUPINFO and found some problems:

  1. %GROUPINFO% does not sort the list of returned groups alphabetically, as far as I can see
  2. %GROUPINFO{"name"}% does not return group information about the named group; instead it returns the list of all members ... this should be solved by a $members variable for the format string
  3. working with $allowschange is a PITA; some parameter to exclude those from the list of group would be better
  4. a separator="$n$n" does not produce two newlines

For instance in this example:
 header="<h2>List of groups I have access to</h2><ul>"
 format="$percntIF{\"$allowschange\" then=\"<li>$name</li>"}$percnt"

I can't suppress the header when there's no ouput via format.

-- MichaelDaum - 14 Mar 2010

GROUPINFO is Crawford's thingy (adding him to feedback..) - but I guess this is more related to some mods i made for the WikiGroups topic, and would benefit from the extraction of the format code i'm working on smile

-- SvenDowideit - 14 Mar 2010

Michael's suggestions all make sense. However I have difficulty understand why this is "Urgent". Sounds more like an "Enhancement". Can you explain?

-- CrawfordCurrie - 14 Mar 2010

It is urgent because I want to block GROUPINFO from being release like that. Once it is in the wild we have a hard time to paddle backwards. We better get that thing done right in the first place.

-- MichaelDaum - 14 Mar 2010

OK, fair point. Go for it.

-- CrawfordCurrie - 15 Mar 2010

don't remove the $allowsChange flag tho - there are enough cases where you want to list groups you can't change smile

-- SvenDowideit - 16 Mar 2010

On 2 I don't understand this. The doc is a bit confusing, but I can't see what you think you can't do. "does not return group information about the named group" - what other information is there about a group, other than the list of members?

Most of your comments seem to relate to $allowschange and I'm not quite sure what the intent/use case was here, so I'm not going to touch it. 1 and 4 and the remark about the header should be trivial to change, and are reasonable.

-- CrawfordCurrie - 18 Mar 2010

There's potentially a lot to associate with a group. One is: who is maintaining the group, that is who has got write access.

The way GROUPINFO works is in fact quite confusing and not very flexible as it is now.

The two $n$n not expanding to two newlines is a bug in expandStandardEscapes() and affects a lot of other macros as well. I just listed it here as part of the rant flow wink

-- MichaelDaum - 18 Mar 2010

actually, no, there is no way you could ever suppress the output of the header from your example - as you are delaying the IF evaluation until after the GROUPINFO has returned. as with all macro's - GROUPINFO would not consider that as an empty result.

-- SvenDowideit - 05 Apr 2010

implemented zeroresults and show parameters - and used them on the DefaultUserRegistration topic.

-- SvenDowideit - 05 Apr 2010

well, thats about as much as I'll be doing I think - Micha, if you have further ideas, please open a new task so we can track the separably.

-- SvenDowideit - 07 Jun 2010

Topic revision: r17 - 04 Oct 2010, KennethLavrsen - This page was cached on 15 Jun 2018 - 10:31.

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