[rt-users] Getting Group memberships

Bruno Mattarollo bruno.mattarollo at gmail.com
Thu Sep 8 00:14:27 EDT 2005


Hello,

We have an RT instance where we've added some other "views" to the
index page so that our users can view how many tickets exist that have
been "taken" but don't belong to them and things like that.

We now have different groups using RT I want to create the query for
those "views" so that we display only the tickets that belong to the
groups the user that's currently logged in is a member of. To explain
it a bit, we have one of those boxes that display the "Newest 20
tickets owned by someone else" but at the moment since some tickets
are created in other queues which I am not a member of, the query is
not correct:

--- start snippet ---

<&|/Elements/TitleBox, 
        title => loc("[_1] newest tickets owned by someone else", $rows),
        title_href => "Search/Results.html".$QueryString &>
<& /Elements/TicketList, 
        Format => "'<a
href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__id__</a>/TITLE:#',
'<a href=\"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__</a>/TITLE:Subject',
QueueName, ExtendedStatus, CreatedRelative, OwnerName, '<A
HREF=\"$RT::WebPath/Ticket/Display.html?Action=Steal&id=__id__\">".loc('Steal')."</a>/TITLE: '
",
        Query => $Query,
        OrderBy => 'Created',
        Order => 'DESC',
        ShowNavigation => 0,
        Rows => $rows                       
        &>
</&>
<%init>
my $rows = 10;
       
my $Query = "Owner != 'Nobody' AND Owner !=
'".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status =
'open' OR Status = 'stalled' )";

--- end snippet ---

I would like to add to this something that would restrict the count to
the queues that the Group the user is a member of has right over. We
assign the privileges to the Groups rather than the individuals, makes
it easier to administer when you have 80+ users.

Any suggestions?

Cheers

/B

-- 
Bruno Mattarollo <bruno.mattarollo at gmail.com>
Currently in: Sydney, Australia



More information about the rt-users mailing list