diff options
Diffstat (limited to 'rt/lib/RT/CustomField.pm')
-rw-r--r-- | rt/lib/RT/CustomField.pm | 125 |
1 files changed, 34 insertions, 91 deletions
diff --git a/rt/lib/RT/CustomField.pm b/rt/lib/RT/CustomField.pm index 212e594cc..be05c3092 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-2005 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ # 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 <jesse@bestpractical.com>) # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST. # @@ -67,6 +67,7 @@ RT::CustomField package RT::CustomField; use RT::Record; +use RT::Queue; use vars qw( @ISA ); @@ -89,17 +90,11 @@ Create takes a hash of values and creates a row in the database: varchar(200) 'Name'. varchar(200) 'Type'. - int(11) 'MaxValues'. - varchar(255) 'Pattern'. - smallint(6) 'Repeated'. + int(11) 'Queue'. 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 @@ -110,24 +105,18 @@ sub Create { my %args = ( Name => '', Type => '', - MaxValues => '', - Pattern => '', - Repeated => '0', + Queue => '0', Description => '', SortOrder => '0', - LookupType => '', Disabled => '0', @_); $self->SUPER::Create( Name => $args{'Name'}, Type => $args{'Type'}, - MaxValues => $args{'MaxValues'}, - Pattern => $args{'Pattern'}, - Repeated => $args{'Repeated'}, + Queue => $args{'Queue'}, Description => $args{'Description'}, SortOrder => $args{'SortOrder'}, - LookupType => $args{'LookupType'}, Disabled => $args{'Disabled'}, ); @@ -180,59 +169,37 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure. =cut -=head2 MaxValues - -Returns the current value of MaxValues. -(In the database, MaxValues is stored as int(11).) - - - -=head2 SetMaxValues VALUE - - -Set MaxValues to VALUE. -Returns (1, 'Status message') on success and (0, 'Error Message') on failure. -(In the database, MaxValues will be stored as a int(11).) - - -=cut - - -=head2 Pattern +=head2 Queue -Returns the current value of Pattern. -(In the database, Pattern is stored as varchar(255).) +Returns the current value of Queue. +(In the database, Queue is stored as int(11).) -=head2 SetPattern VALUE +=head2 SetQueue VALUE -Set Pattern to VALUE. +Set Queue to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. -(In the database, Pattern will be stored as a varchar(255).) +(In the database, Queue will be stored as a int(11).) =cut -=head2 Repeated - -Returns the current value of Repeated. -(In the database, Repeated is stored as smallint(6).) - - +=head2 QueueObj -=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).) +Returns the Queue Object which has the id returned by Queue =cut +sub QueueObj { + my $self = shift; + my $Queue = RT::Queue->new($self->CurrentUser); + $Queue->Load($self->__Value('Queue')); + return($Queue); +} =head2 Description @@ -270,24 +237,6 @@ 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. @@ -347,33 +296,27 @@ sub _CoreAccessible { { id => - {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''}, + {read => 1, type => 'int(11)', default => ''}, Name => - {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''}, + {read => 1, write => 1, type => 'varchar(200)', default => ''}, Type => - {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 => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''}, - Repeated => - {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'}, + {read => 1, write => 1, type => 'varchar(200)', default => ''}, + Queue => + {read => 1, write => 1, type => 'int(11)', default => '0'}, Description => - {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''}, + {read => 1, write => 1, type => 'varchar(255)', default => ''}, SortOrder => - {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 => ''}, + {read => 1, write => 1, type => 'int(11)', default => '0'}, Creator => - {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'}, + {read => 1, auto => 1, type => 'int(11)', default => '0'}, Created => - {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''}, + {read => 1, auto => 1, type => 'datetime', default => ''}, LastUpdatedBy => - {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'}, + {read => 1, auto => 1, type => 'int(11)', default => '0'}, LastUpdated => - {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''}, + {read => 1, auto => 1, type => 'datetime', default => ''}, Disabled => - {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'}, + {read => 1, write => 1, type => 'smallint(6)', default => '0'}, } }; @@ -405,7 +348,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. -Each of these files should begin with the line +If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line no warnings qw(redefine); |