AutoRequestorTicketSearch

From Request Tracker Wiki
Revision as of 16:52, 9 April 2014 by Jcharaoui (talk) (Created page with "When creating tickets in RT on behalf of a user, it's often useful to look over the list of tickets in which the user is a requestor in order to avoid duplicates. Opening a ta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

When creating tickets in RT on behalf of a user, it's often useful to look over the list of tickets in which the user is a requestor in order to avoid duplicates. Opening a tab, moving to the search page and building a new search can however be uselessly time-consuming.

With this simple customisation, upon selecting a Requestor through the autocomplete dropdown on the ticket creation page, a panel will appear on the bottom of the page listing this user's most recent tickets.

In Callbacks/AutoRequestorTicketSearch/Ticket/Create.html/AutoRequestorTicketSearch :


<script type="text/javascript">
   jQuery(document).ready(function(){
     jQuery('form[name=TicketCreate]').after('<div id="auto-requestor-ticket-search" style="clear:both;"></div>');
     jQuery('input#Requestors').autocomplete({
         select:function( event, ui ) {
             jQuery('#auto-requestor-ticket-search').empty().load("/Helpers/AutoRequestorTicketSearch.html?" + jQuery.param({ UserEmail: ui.item.value }));
         }
     });
   });
 </script>