Queue-rights

Hm, thought:
Is it possible to add a new right “QueueMember” which I can use on the
first page and Quicksearch? Is this hard to do?

/J

kim.taylor@pncbank.com wrote:

>>However, I want something to use to show what projects an employee

>>actually works with. This is so that the quick-search and first page

>>won’t clog up entirely with uninteresting queues that an employee

>>doesn’t work with, but still must be able to handle when necessary.

If I’m not mistaken, Jesse mentioned a while ago that a "My favorites"
thingie is somewhere on the list for 3.0.x. That sounds like what you want.
Don’t know about the priority of that item.

But I’m sure the priority will increase if you just give Jesse all your
money :slight_smile:

Regards,

Martin

To answer myself: It wasn’t :slight_smile:

Next question: In a scrip, how do I get all users that has a certain
right on a certain Queue? I can get the QueueObj by
$self->TicketObj->QueueObj, but how do I loop (or something) this object
to get all users that has the right (my own defined) “WorkMember”.

In pseudo-code:
while (my $UserObj = QueueObj->AllUsersWithRight(“WorkMember”)) {
… send email …
}

Jonas Lincoln wrote:

I invented a right “WorkMember” for people who actually works on a
Queue. To use this later in for example QuickSearch, I copied the
Queues->Next function to a Queues->NextLimit function and altered
NextLimit to consider WorkMembers. See code below.

diff -u lib/RT/Queue_Overlay.pm lib/RT/Queue_Local.pm

— lib/RT/Queue_Overlay.pm Wed May 7 15:18:41 2003
+++ lib/RT/Queue_Local.pm Wed May 14 12:51:37 2003
@@ -85,7 +85,8 @@
CommentOnTicket => ‘Comment on tickets’,

loc_pair

  OwnTicket       => 'Own tickets', 

loc_pair

  ModifyTicket    => 'Modify tickets', 

loc_pair

  • DeleteTicket => ‘Delete tickets’ #
    loc_pair
  • DeleteTicket => ‘Delete tickets’,

loc_pair

  • WorkMember => ‘Member of a Queue’

loc_pair

};

diff -u lib/RT/Queues_Overlay.pm lib/RT/Queues_Local.pm

— lib/RT/Queues_Overlay.pm Wed May 7 15:18:41 2003
+++ lib/RT/Queues_Local.pm Wed May 14 13:04:20 2003
@@ -126,5 +126,37 @@
}

}}}

+# {{{ sub NextLimit
+=head2 NextLimit
+Returns the next queue that this user can see and is a member of
+=cut
+sub NextLimit {

  • my $self = shift;
  • my $Queue = $self->SUPER::Next();
  • if ((defined($Queue)) and (ref($Queue))) {
  •   if ($Queue->CurrentUserHasRight('SeeQueue') and 
    

$Queue->CurrentUserHasRight(‘WorkMember’)) {

  •       return($Queue);
    
  •   }
    
  •   #If the user doesn't have the right to show this queue
    
  •   else {
    
  •       return($self->Next());
    
  •   }
    
  • }
  • #if there never was any queue
  • else {
  •   return(undef);
    
  • }
    +}
    +# }}}
    1;

and for the QuickSearch, simply replace
while (my $queue = $Queues->Next) {
with
while (my $queue = $Queues->NextLimit) {

Hope this helps, it helps me at least :slight_smile:

/Jonas

kim.taylor@pncbank.com wrote:

I have the following scenario:
Management has a lot of projects, 50+. These will each get an own queue.
All staff-workers will get rights to work in all queues.

However, I want something to use to show what projects an employee
actually works with. This is so that the quick-search and first page
won’t clog up entirely with uninteresting queues that an employee
doesn’t work with, but still must be able to handle when necessary.

How do I solve this? Suggestions?

/J

At 4:52 PM +0200 5/13/03, Jonas Lincoln wrote:

I have the following scenario:
Management has a lot of projects, 50+. These will each get an own
queue. All staff-workers will get rights to work in all queues.

However, I want something to use to show what projects an employee
actually works with. This is so that the quick-search and first page
won’t clog up entirely with uninteresting queues that an employee
doesn’t work with, but still must be able to handle when necessary.

How do I solve this? Suggestions?

/J


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Construct a search ( The search menu ) where user = username and
ticket status is open .

Bookmark the “Bookmarkable URL for this search”. ( give it a nice name )

Repeat for every user you want a quick search for.

2 cents.

Brussels University
Pleinlaan 2
Computer Center VUB/ULB (VUBnet)
Ing. Robert Jansen
B-1050 Brussels
Belgium (Europe)

email: rjansen@vub.ac.be
Tel: +32-2-650.36.94
Secr: +32-2-650.37.38
Fax: +32-2-650.37.40