projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ea0778
)
update custom priorioty field BS for RT 3.4.4
author
ivan
<ivan>
Fri, 18 Nov 2005 09:44:26 +0000
(09:44 +0000)
committer
ivan
<ivan>
Fri, 18 Nov 2005 09:44:26 +0000
(09:44 +0000)
FS/FS/TicketSystem/RT_External.pm
patch
|
blob
|
history
diff --git
a/FS/FS/TicketSystem/RT_External.pm
b/FS/FS/TicketSystem/RT_External.pm
index
b69af43
..
f8f5472
100644
(file)
--- a/
FS/FS/TicketSystem/RT_External.pm
+++ b/
FS/FS/TicketSystem/RT_External.pm
@@
-56,7
+56,7
@@
sub customer_tickets {
my( $from_sql, @param) = $self->_from_customer( $custnum, $priority );
my $sql = "select tickets.*, queues.name".
my( $from_sql, @param) = $self->_from_customer( $custnum, $priority );
my $sql = "select tickets.*, queues.name".
- ( length($priority) ? ",
ticke
tcustomfieldvalues.content" : '' ).
+ ( length($priority) ? ",
objec
tcustomfieldvalues.content" : '' ).
" $from_sql order by priority desc limit $limit";
my $sth = $dbh->prepare($sql) or die $dbh->errstr. "preparing $sql";
$sth->execute(@param) or die $sth->errstr. "executing $sql";
" $from_sql order by priority desc limit $limit";
my $sth = $dbh->prepare($sql) or die $dbh->errstr. "preparing $sql";
$sth->execute(@param) or die $sth->errstr. "executing $sql";
@@
-91,10
+91,11
@@
sub _from_customer {
#";
push @param, $priority;
#";
push @param, $priority;
- $join = "join
Ticke
tCustomFieldValues
- on ( tickets.id =
TicketCustomFieldValues.ticket
)";
+ $join = "join
Objec
tCustomFieldValues
+ on ( tickets.id =
ObjectCustomFieldValues.ObjectId
)";
- $where = "and content = ?
+ $where = "and ObjectType = 'RT::Ticket'
+ and content = ?
and customfield = ( select id from customfields
where name = ?
and ( $queue_sql )
and customfield = ( select id from customfields
where name = ?
and ( $queue_sql )
@@
-102,8
+103,9
@@
sub _from_customer {
";
} else {
$where =
";
} else {
$where =
- "and 0 = ( select count(*) from TicketCustomFieldValues
- where ticket = tickets.id
+ "and 0 = ( select count(*) from ObjectCustomFieldValues
+ where ObjectId = tickets.id
+ and ObjectType = 'RT::Ticket'
and customfield = ( select id from customfields
where name = ?
and ( $queue_sql )
and customfield = ( select id from customfields
where name = ?
and ( $queue_sql )