[rt-users] Change Owner in QuickCreate / QuickTicket to dropdown list of Users based on Queue

Emmanuel Lacour elacour at easter-eggs.com
Wed Apr 9 05:44:58 EDT 2014


On Wed, Apr 09, 2014 at 11:06:42AM +0200, Bartosz Maciejewski wrote:
> Hello, I want to change field from only Me and Nobody to full list
> of Users which have rights to Queue.
> 
> So far I managed to change this code on QuickCreate Element:
> 
> <td class="label"><&|/l&>Owner</&>:</td><td class="value">
> <select type="select" name="Owner">
> <option value="<%RT->Nobody->id%>"><%loc('Nikt')%></option>
> <option value="<%$session{'CurrentUser'}->id%>"
> selected="selected"><&|/l&>Ja</&></option>
> 
> To this:
> 
> <td class="label"><&|/l&>Owner</&>:</td><td class="value"><&
> /Elements/SelectOwner, Name => 'Owner' &>
> 
> And it works, but gives me list of all users. Putting
> SelectOwnerDropdown instead of SelectOwner narrows selection only to
> Me and Nobody again.
> 
> Can this be done like in Ticket/Create.html - list of users only
> granted rights to specific Queue? What I can see in Create.html it
> is handled other way - like using EditBasisc element?
> 


The problem is that in Create.html, the queue is already known so we can
list owners only for this queue. In Quickcreate, the queue is selected
at the same time, so you need to use some ajax query to update the owner
dropdown. Here is a hint for this:

http://issues.bestpractical.com/Ticket/Display.html?id=12545

any patch for a recent RT is welcome ;)

-- 
Easter-eggs                              Spécialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37    -   Fax: +33 (0) 1 43 35 00 76
mailto:elacour at easter-eggs.com  -   http://www.easter-eggs.com



More information about the rt-users mailing list