X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FCustomField.pm;h=dc4108044bbc7be116add3edfa729d1ed7c84682;hb=8c5a780343e027058a51692d8b9b8140c88ce6c7;hp=be05c30920ee9255bb5e70d6e3bac0f1d81a2553;hpb=d39d52aac8f38ea9115628039f0df5aa3ac826de;p=freeside.git diff --git a/rt/lib/RT/CustomField.pm b/rt/lib/RT/CustomField.pm index be05c3092..dc4108044 100644 --- a/rt/lib/RT/CustomField.pm +++ b/rt/lib/RT/CustomField.pm @@ -1,8 +1,8 @@ -# {{{ BEGIN BPS TAGGED BLOCK +# BEGIN BPS TAGGED BLOCK {{{ # # COPYRIGHT: -# -# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +# +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -42,7 +44,8 @@ # works based on those contributions, and sublicense and distribute # those contributions and any derivatives thereof. # -# }}} END BPS TAGGED BLOCK +# END BPS TAGGED BLOCK }}} + # Autogenerated by DBIx::SearchBuilder factory (by ) # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST. # @@ -67,7 +70,6 @@ RT::CustomField package RT::CustomField; use RT::Record; -use RT::Queue; use vars qw( @ISA ); @@ -90,11 +92,17 @@ Create takes a hash of values and creates a row in the database: varchar(200) 'Name'. varchar(200) 'Type'. - int(11) 'Queue'. + int(11) 'MaxValues'. + longtext 'Pattern'. + smallint(6) 'Repeated'. varchar(255) 'Description'. int(11) 'SortOrder'. + varchar(255) 'LookupType'. smallint(6) 'Disabled'. + 'LookupType' is generally the result of either + RT::Ticket->CustomFieldLookupType or RT::Transaction->CustomFieldLookupType + =cut @@ -105,19 +113,30 @@ sub Create { my %args = ( Name => '', Type => '', - Queue => '0', + MaxValues => '', + Pattern => '', + Repeated => '0', Description => '', SortOrder => '0', + LookupType => '', Disabled => '0', + LinkToValue => '', + IncludeContentForValue => '', + Required => '0', - @_); + @_); $self->SUPER::Create( Name => $args{'Name'}, Type => $args{'Type'}, - Queue => $args{'Queue'}, + MaxValues => $args{'MaxValues'}, + Pattern => $args{'Pattern'}, + Repeated => $args{'Repeated'}, Description => $args{'Description'}, SortOrder => $args{'SortOrder'}, + LookupType => $args{'LookupType'}, Disabled => $args{'Disabled'}, + LinkToValue => $args{'LinkToValue'}, + IncludeContentForValue => $args{'IncludeContentForValue'} ); } @@ -169,37 +188,59 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure. =cut -=head2 Queue +=head2 MaxValues -Returns the current value of Queue. -(In the database, Queue is stored as int(11).) +Returns the current value of MaxValues. +(In the database, MaxValues is stored as int(11).) -=head2 SetQueue VALUE +=head2 SetMaxValues VALUE -Set Queue to VALUE. +Set MaxValues to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. -(In the database, Queue will be stored as a int(11).) +(In the database, MaxValues will be stored as a int(11).) =cut -=head2 QueueObj +=head2 Pattern + +Returns the current value of Pattern. +(In the database, Pattern is stored as longtext.) + -Returns the Queue Object which has the id returned by Queue + +=head2 SetPattern VALUE + + +Set Pattern to VALUE. +Returns (1, 'Status message') on success and (0, 'Error Message') on failure. +(In the database, Pattern will be stored as a longtext.) + + +=cut + + +=head2 Repeated + +Returns the current value of Repeated. +(In the database, Repeated is stored as smallint(6).) + + + +=head2 SetRepeated VALUE + + +Set Repeated to VALUE. +Returns (1, 'Status message') on success and (0, 'Error Message') on failure. +(In the database, Repeated will be stored as a smallint(6).) =cut -sub QueueObj { - my $self = shift; - my $Queue = RT::Queue->new($self->CurrentUser); - $Queue->Load($self->__Value('Queue')); - return($Queue); -} =head2 Description @@ -237,6 +278,24 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure. =cut +=head2 LookupType + +Returns the current value of LookupType. +(In the database, LookupType is stored as varchar(255).) + + + +=head2 SetLookupType VALUE + + +Set LookupType to VALUE. +Returns (1, 'Status message') on success and (0, 'Error Message') on failure. +(In the database, LookupType will be stored as a varchar(255).) + + +=cut + + =head2 Creator Returns the current value of Creator. @@ -296,27 +355,35 @@ sub _CoreAccessible { { id => - {read => 1, type => 'int(11)', default => ''}, + {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''}, Name => - {read => 1, write => 1, type => 'varchar(200)', default => ''}, + {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''}, Type => - {read => 1, write => 1, type => 'varchar(200)', default => ''}, - Queue => - {read => 1, write => 1, type => 'int(11)', default => '0'}, + {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''}, + MaxValues => + {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''}, + Pattern => + {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'longtext', default => ''}, + Repeated => + {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'}, Description => - {read => 1, write => 1, type => 'varchar(255)', default => ''}, + {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''}, SortOrder => - {read => 1, write => 1, type => 'int(11)', default => '0'}, + {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'}, + LookupType => + {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''}, Creator => - {read => 1, auto => 1, type => 'int(11)', default => '0'}, + {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'}, Created => - {read => 1, auto => 1, type => 'datetime', default => ''}, + {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''}, LastUpdatedBy => - {read => 1, auto => 1, type => 'int(11)', default => '0'}, + {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'}, LastUpdated => - {read => 1, auto => 1, type => 'datetime', default => ''}, + {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''}, Disabled => - {read => 1, write => 1, type => 'smallint(6)', default => '0'}, + {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'}, } }; @@ -348,7 +415,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz These overlay files can contain new subs or subs to replace existing subs in this module. -If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line +Each of these files should begin with the line no warnings qw(redefine);