[rt-users] auto-assign on create from web ui?

Drew Barnes barnesaw at ucrwcu.rwc.uc.edu
Tue Oct 16 08:36:15 EDT 2007


On Tickets/Create.html you could always modify the /Elements/SelectOwner
block to use CurrentUser and leave Nobody as another option.

To do this (for a slightly different purpose) I replaced
<td class="label">
<&|/l&>Owner</&>:
</td>
<td class="value">
<& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj,
Default => $ARGS{Owner}||$RT::Nobody->Id, DefaultValue => 0 &>
</td>

with :
<td class="label">
<&|/l&>Owner</&>:
</td>
<td class="value">
<select type="select" name="Owner">
<option value="<%$session{'CurrentUser'}->id%>"
SELECTED><%$session{'CurrentUser'}->Name %></option>
<option value="<%$RT::Nobody->id%>"><%loc('Nobody')%></option> 
</select>
</td>


Any tickets created through the UI will have the creator automatically
selected as the owner, and email tickets will still appear as nobody.


Gene LeDuc wrote:
> Hi Gary,
>
> There might be a better way, but I use the GetHeader methof of the
> Attachment class to see if the Ticket's first transaction has any
> "Received" headers.  No received headers means not e-mail.
>
> I can't find an example at the moment, but it would be something like
>    if ( $self->TicketObj->Attachments->First->GetHeader("Received") ) ...
>
> Gene
>
> At 03:12 PM 10/15/2007, Gary Oberbrunner wrote:
>> Is it possible to tell whether a ticket is coming from email (all our
>> tickets
>> from customers come in that way) or via the web ui (in which case
>> it's entered
>> by a tech)?  I'd like tickets entered via the web ui to get
>> auto-assigned to
>> the person entering them.
>>
>> thx,
>>
>> -- Gary Oberbrunner
>>
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>
>



More information about the rt-users mailing list