Foswiki on GitHub is open for business! Next release meeting: Monday Nov. 17, 1300Z

Item10818: New groups UI doesn't add groups to a group because JQueryAjaxHelper?section=user only lists users

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension JQueryPlugin  
-- PaulHarvey - 01 Jun 2011

Patch I'm using atm:
diff --git a/data/System/JQueryAjaxHelper.txt b/data/System/JQueryAjaxHelper.txt
index dc3d74d..d624fec 100644
--- a/data/System/JQueryAjaxHelper.txt
+++ b/data/System/JQueryAjaxHelper.txt
@@ -239,16 +239,16 @@ jQuery(function($){
    * =q=: search term substring typed so far
    * =limit=: number of search results to return, defaults to 10
 <verbatim class="tml">
-   "^%URLPARAM{"q" default="does not exist"}%.*"
-   type="regex"
+   "lc(name)~lc('*%URLPARAM{"q" default="does not exist"}%*') AND ('UserForm' OR lc(name)~'*group')"
+   type="query"
-   format="$percntUSERINFO{\"$topic\" format=\"<nop>$dollarwikiname|$dollaremails|$percntFORMFIELD{\"Photo\" topic=\"$web.$topic\" default=\"%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/images/nobody.gif\" alttext=\"%PUBURLPATH%/%SYSTEMWEB%/JQueryPlugin/images/nobody.gif\"}$percnt$n\"}$percnt"
+   format="$percntIF{\"'$formname'~'*UserForm'\" then=\"$percntUSERINFO{\"$topic\" format=\"<nop>$dollarwikiname|$dollaremails|$formfield(Photo)\"}$percnt\" else=\"<nop>$topic|$percntCALC{$LISTMAP(<nop>$item, $LISTTRUNCATE(5, $percntQUERY{'$web.$topic'/preferences[name='GROUP'].value}$percnt))}$percnt, ...\"}$percnt|$n"
    limit="%URLPARAM{"limit" default="10"}%"
 ---+++ Example

-- PaulHarvey - 22 Jun 2011

Paul, Does this still apply? I'm able to add groups to groups just fine. I think enforcing the list to existing users (or groups) has been disabled.

-- GeorgeClark - 28 Oct 2011

The current JQueryAjaxHelper uses a format that works only for users. It still doesn't work for me: *Group suggestions are not present in the add members autocomplete

-- PaulHarvey - 29 Oct 2011

Paul, I've spent quite a few hours on this today - the JQueryAjaxHelper seems to have changed a lot since your patch - I'm getting lost in the nested quotes and percents and dollars. I'm beginning to wonder if it makes more sense to update the USERINFO macro to return some similar information if the target is a groupname instead of a username. A group being a special form of a "user".

-- GeorgeClark - 29 Oct 2011

Ok. I need to revisit this at a later date.

-- PaulHarvey - 30 Oct 2011

ItemTemplate edit

Summary New groups UI doesn't add groups to a group because JQueryAjaxHelper?section=user only lists users
ReportedBy PaulHarvey
Codebase 1.1.3, trunk
SVN Range
AppliesTo Extension
Component JQueryPlugin
Priority Normal
CurrentState Closed
Checkins distro:4ca5b6460ab1 distro:830a80b26df4
TargetRelease patch
ReleasedIn 1.1.4
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:830a80b26df4
Release01x01Checkins distro:4ca5b6460ab1
Topic revision: r10 - 17 Dec 2011, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License