[freeside-commits] freeside/FS/FS/TicketSystem RT_External.pm, 1.38, 1.39
Ivan,,,
ivan at wavetail.420.am
Wed Mar 10 19:27:39 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/TicketSystem
In directory wavetail.420.am:/tmp/cvs-serv24251/FS/FS/TicketSystem
Modified Files:
RT_External.pm
Log Message:
add queue selection to customer ticket creation, RT#7656
Index: RT_External.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/TicketSystem/RT_External.pm,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -w -d -r1.38 -r1.39
--- RT_External.pm 12 Feb 2010 01:35:32 -0000 1.38
+++ RT_External.pm 11 Mar 2010 03:27:37 -0000 1.39
@@ -273,7 +273,7 @@
}
-sub href_new_ticket {
+sub href_params_new_ticket {
my( $self, $custnum_or_cust_main, $requestors ) = @_;
my( $custnum, $cust_main );
@@ -284,14 +284,25 @@
$custnum = $custnum_or_cust_main;
$cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
}
- my $queueid = $cust_main->agent->ticketing_queueid || $default_queueid;
- $self->baseurl.
- 'Ticket/Create.html?'.
- "Queue=$queueid".
- "&new-MemberOf=freeside://freeside/cust_main/$custnum".
- ( $requestors ? '&Requestors='. uri_escape($requestors) : '' )
- ;
+ my %param = (
+ 'Queue' => ($cust_main->agent->ticketing_queueid || $default_queueid),
+ 'new-MemberOf'=> "freeside://freeside/cust_main/$custnum",
+ 'Requestors' => $requestors,
+ );
+
+ ( $self->baseurl.'Ticket/Create.html', %param );
+}
+
+sub href_new_ticket {
+ my $self = shift;
+
+ my( $base, %param ) = $self->href_params_new_ticket(@_);
+
+ my $uri = new URI $base;
+ $uri->query_form(%param);
+ $uri;
+
}
sub href_ticket {
More information about the freeside-commits
mailing list