[freeside-commits] freeside/FS/FS/TicketSystem RT_External.pm, 1.28, 1.29
Ivan,,,
ivan at wavetail.420.am
Mon Oct 8 21:48:27 PDT 2007
Update of /home/cvs/cvsroot/freeside/FS/FS/TicketSystem
In directory wavetail:/tmp/cvs-serv31993/TicketSystem
Modified Files:
RT_External.pm
Log Message:
add ticket_system-priority_reverse config
Index: RT_External.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/TicketSystem/RT_External.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- RT_External.pm 24 Sep 2007 15:47:50 -0000 1.28
+++ RT_External.pm 9 Oct 2007 04:48:25 -0000 1.29
@@ -2,6 +2,7 @@
use strict;
use vars qw( $DEBUG $me $conf $dbh $default_queueid $external_url
+ $priority_reverse
$priority_field $priority_field_queue $field
);
use URI::Escape;
@@ -15,6 +16,7 @@
FS::UID->install_callback( sub {
$conf = new FS::Conf;
$default_queueid = $conf->config('ticket_system-default_queueid');
+ $priority_reverse = $conf->exists('ticket_system-priority_reverse');
$priority_field =
$conf->config('ticket_system-custom_priority_field');
if ( $priority_field ) {
@@ -75,7 +77,11 @@
"position(tickets.status in 'newopenstalledresolvedrejecteddeleted')".
" AS svalue " .
( length($priority) ? ", objectcustomfieldvalues.content" : '' ).
- " $from_sql ORDER BY svalue, priority DESC, id DESC LIMIT $limit";
+ " $from_sql ".
+ " ORDER BY svalue, ".
+ " priority ". ( $priority_reverse ? 'ASC' : 'DESC' ). ", ".
+ " id DESC ".
+ " LIMIT $limit";
warn "$me $sql (@param)" if $DEBUG;
my $sth = $dbh->prepare($sql) or die $dbh->errstr. "preparing $sql";
$sth->execute(@param) or die $sth->errstr. "executing $sql";
More information about the freeside-commits
mailing list