diff options
author | ivan <ivan> | 2004-12-09 21:33:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-12-09 21:33:57 +0000 |
commit | 57323a695e58b58cc8892784d356995f6e41bfcd (patch) | |
tree | e9b5b953f7b6e742d7e5c6572a6e4d2f8b497dff | |
parent | e42d636dd0efb8d7c9aceb7402f866d2a4950498 (diff) |
set default requestor to email invoice addresses
-rw-r--r-- | FS/FS/TicketSystem/RT_External.pm | 9 | ||||
-rw-r--r-- | httemplate/view/cust_main/tickets.html | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/FS/FS/TicketSystem/RT_External.pm b/FS/FS/TicketSystem/RT_External.pm index c59fab48b..66f874702 100644 --- a/FS/FS/TicketSystem/RT_External.pm +++ b/FS/FS/TicketSystem/RT_External.pm @@ -3,6 +3,7 @@ package FS::TicketSystem::RT_External; use strict; use vars qw( $conf $default_queueid $priority_field $priority_field_queue $field ); +use URI::Escape; use FS::UID; install_callback FS::UID sub { @@ -122,6 +123,8 @@ sub _from_customer { sub href_customer_tickets { my( $self, $custnum, $priority ) = @_; + #i snarfed this from an RT bookmarked search, it could be unescaped in the + #source for readability and run through uri_escape my $href = 'Search/Results.html?Order=ASC&Query=%20MemberOf%20%3D%20%27freeside%3A%2F%2Ffreeside%2Fcust_main%2F'. $custnum. @@ -156,10 +159,12 @@ sub href_customer_tickets { sub href_new_ticket { - my( $self, $custnum ) = @_; + my( $self, $custnum, $requestors ) = @_; 'Ticket/Create.html?'. "Queue=$default_queueid". - "&new-MemberOf=freeside://freeside/cust_main/$custnum"; + "&new-MemberOf=freeside://freeside/cust_main/$custnum". + ( $requestors ? '&Requestors='. uri_escape($requestors) : '' ) + ; } sub href_ticket { diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index 61c94d61f..d6ddfa64c 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -30,7 +30,7 @@ Highest priority tickets (<A HREF="<%= FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View all tickets for this customer</A>) -(<A HREF="<%= FS::TicketSystem->href_new_ticket($cust_main->custnum) %>">New ticket for this customer</A>) +(<A HREF="<%= FS::TicketSystem->href_new_ticket($cust_main->custnum, join(', ', grep { $_ ne 'POST' } $cust_main->invoicing_list ) ) %>">New ticket for this customer</A>) <%= table() %> <TR> <TH>#</TH> |