[gold-users] Re: Querying projects by user
Scott Jackson
scott at clusterresources.com
Mon Mar 31 16:57:14 MDT 2008
Kevin,
Yep. You got it. You would have:
# goldsh ProjectUser Query Show:=Project Name==amy Active==True
Project
----------
biology
chemistry
BusinessA
accounting
(you could probably get by without the Active==True)
or you could use unix tricks like:
glsproject --show=Name,Users --quiet|grep amy|cut -d' ' -f 1
Scott
On Mon, 2008-03-31 at 17:23 -0400, Kevin Van Workum wrote:
> On Mon, Mar 31, 2008 at 5:16 PM, Kevin Van Workum <vanw at tticluster.com> wrote:
> > Hi,
> >
> > I'd like to get a list of all the projects to which a particular user
> > belongs. glsprojects will show the users that belong to a project, but
> > how do I do the reverse?
> >
> > I unsuccessfully tried:
> >
> > gold> Project Query Users ~ vanw
> > Users is not a valid attribute for the Project object
> >
> > Actually, I'd like to write a Perl script to do this, so I need something like:
> >
> > my $request = new Gold::Request(object => "Project", action => "Query");
> > Gold::Client::buildSupplements($request);
> > $request->setCondition("Users", $user, "Match") if defined $user;
> >
> > But can't quite figure it out.
> >
> > Thanks.
> > --
> > Kevin Van Workum, Ph.D.
> >
>
> Sorry, but I think I got it:
>
> goldsh> ProjectUser Query Show:=Project Name==uid
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
More information about the gold-users
mailing list