From 8c5a780343e027058a51692d8b9b8140c88ce6c7 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 1 Sep 2010 23:39:23 +0000 Subject: RT mandatory custom fields, RT#9260 --- rt/lib/RT/CustomField.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rt/lib') diff --git a/rt/lib/RT/CustomField.pm b/rt/lib/RT/CustomField.pm index 995728f67..dc4108044 100644 --- a/rt/lib/RT/CustomField.pm +++ b/rt/lib/RT/CustomField.pm @@ -122,6 +122,7 @@ sub Create { Disabled => '0', LinkToValue => '', IncludeContentForValue => '', + Required => '0', @_); $self->SUPER::Create( @@ -381,6 +382,8 @@ sub _CoreAccessible { {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''}, Disabled => {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'}, + Required => + {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'}, } }; -- cgit v1.2.1 From 72bf8f0f896709bdafe88c0232bcd1758bab5796 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 10 Sep 2010 06:17:04 +0000 Subject: fix for spurious customers appearing, thanks to Erik L --- rt/lib/RT/Ticket_Overlay.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rt/lib') diff --git a/rt/lib/RT/Ticket_Overlay.pm b/rt/lib/RT/Ticket_Overlay.pm index b60ae38bd..8d04742e9 100644 --- a/rt/lib/RT/Ticket_Overlay.pm +++ b/rt/lib/RT/Ticket_Overlay.pm @@ -2312,6 +2312,16 @@ sub _Links { return $links; } + # without this you will also get RT::User(s) instead of tickets! + if ($field == 'Base' and $type == 'MemberOf') { + my $rtname = RT->Config->Get('rtname'); + $links->Limit( + FIELD => 'Base', + OPERATOR => 'STARTSWITH', + VALUE => "fsck.com-rt://$rtname/ticket/", + ); + } + # Maybe this ticket is a merge ticket my $limit_on = 'Local'. $field; # at least to myself -- cgit v1.2.1 From 9b05a3660eabd3215bdebf9429eb490b41570436 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 17 Sep 2010 23:32:33 +0000 Subject: refactor giant cust_main.pm a little in preparation of adding API methods for maestro, RT#9967 --- rt/lib/RT/URI/freeside/Internal.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rt/lib') diff --git a/rt/lib/RT/URI/freeside/Internal.pm b/rt/lib/RT/URI/freeside/Internal.pm index bd7c42ccf..b5af134ac 100644 --- a/rt/lib/RT/URI/freeside/Internal.pm +++ b/rt/lib/RT/URI/freeside/Internal.pm @@ -104,13 +104,13 @@ sub FreesideGetConfig { sub smart_search { #Subroutine - return map { { $_->hash } } &FS::cust_main::smart_search(@_); + return map { { $_->hash } } &FS::cust_main::Search::smart_search(@_); } sub email_search { #Subroutine - return map { { $_->hash } } &FS::cust_main::email_search(@_); + return map { { $_->hash } } &FS::cust_main::Search::email_search(@_); } -- cgit v1.2.1 From bd35baff8b7b5dcdd44d14a1139ef4d48009274c Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 4 Nov 2010 05:57:00 +0000 Subject: clean up postgres-isms, RT#10324 --- rt/lib/RT/Tickets_Overlay.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'rt/lib') diff --git a/rt/lib/RT/Tickets_Overlay.pm b/rt/lib/RT/Tickets_Overlay.pm index f2949ed7a..be5a0d5fb 100644 --- a/rt/lib/RT/Tickets_Overlay.pm +++ b/rt/lib/RT/Tickets_Overlay.pm @@ -1855,7 +1855,13 @@ sub OrderByCols { ); #if there was a Links.RemoteTarget int, this bs wouldn't be necessary - my $custnum_sql = "CAST(SUBSTR($linkalias.Target,31) AS INTEGER)"; + my $custnum_sql = "CAST(SUBSTR($linkalias.Target,31) AS "; + if ( RT->Config->Get('DatabaseType') eq 'mysql' ) { + $custnum_sql .= 'SIGNED INTEGER)'; + } + else { + $custnum_sql .= 'INTEGER)'; + } if ( $subkey eq 'Number' ) { -- cgit v1.2.1