1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
6 # <jesse@bestpractical.com>
8 # (Except where explicitly superseded by other copyright notices)
13 # This work is made available to you under the terms of Version 2 of
14 # the GNU General Public License. A copy of that license should have
15 # been provided with this software, but in any event can be snarfed
18 # This work is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 # 02110-1301 or visit their web page on the internet at
27 # http://www.gnu.org/copyleft/gpl.html.
30 # CONTRIBUTION SUBMISSION POLICY:
32 # (The following paragraph is not intended to limit the rights granted
33 # to you to modify and distribute this software under the terms of
34 # the GNU General Public License and is only of importance to you if
35 # you choose to contribute your changes and enhancements to the
36 # community by submitting them to Best Practical Solutions, LLC.)
38 # By intentionally submitting any modifications, corrections or
39 # derivatives to this work, or any other work intended for use with
40 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
41 # you are the copyright holder for those contributions and you grant
42 # Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
43 # royalty-free, perpetual, license to use, copy, create derivative
44 # works based on those contributions, and sublicense and distribute
45 # those contributions and any derivatives thereof.
47 # END BPS TAGGED BLOCK }}}
48 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
49 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
51 # !! DO NOT EDIT THIS FILE !!
76 @ISA= qw( RT::Record );
81 $self->Table('Tickets');
82 $self->SUPER::_Init(@_);
89 =head2 Create PARAMHASH
91 Create takes a hash of values and creates a row in the database:
93 int(11) 'EffectiveId'.
96 int(11) 'IssueStatement'.
99 varchar(200) 'Subject' defaults to '[no subject]'.
100 int(11) 'InitialPriority'.
101 int(11) 'FinalPriority'.
103 int(11) 'TimeEstimated'.
104 int(11) 'TimeWorked'.
105 varchar(10) 'Status'.
112 smallint(6) 'Disabled'.
125 IssueStatement => '0',
128 Subject => '[no subject]',
129 InitialPriority => '0',
130 FinalPriority => '0',
132 TimeEstimated => '0',
144 $self->SUPER::Create(
145 EffectiveId => $args{'EffectiveId'},
146 Queue => $args{'Queue'},
147 Type => $args{'Type'},
148 IssueStatement => $args{'IssueStatement'},
149 Resolution => $args{'Resolution'},
150 Owner => $args{'Owner'},
151 Subject => $args{'Subject'},
152 InitialPriority => $args{'InitialPriority'},
153 FinalPriority => $args{'FinalPriority'},
154 Priority => $args{'Priority'},
155 TimeEstimated => $args{'TimeEstimated'},
156 TimeWorked => $args{'TimeWorked'},
157 Status => $args{'Status'},
158 TimeLeft => $args{'TimeLeft'},
159 Told => $args{'Told'},
160 Starts => $args{'Starts'},
161 Started => $args{'Started'},
163 Resolved => $args{'Resolved'},
164 Disabled => $args{'Disabled'},
173 Returns the current value of id.
174 (In the database, id is stored as int(11).)
182 Returns the current value of EffectiveId.
183 (In the database, EffectiveId is stored as int(11).)
187 =head2 SetEffectiveId VALUE
190 Set EffectiveId to VALUE.
191 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
192 (In the database, EffectiveId will be stored as a int(11).)
200 Returns the current value of Queue.
201 (In the database, Queue is stored as int(11).)
205 =head2 SetQueue VALUE
209 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
210 (In the database, Queue will be stored as a int(11).)
218 Returns the Queue Object which has the id returned by Queue
225 my $Queue = RT::Queue->new($self->CurrentUser);
226 $Queue->Load($self->__Value('Queue'));
232 Returns the current value of Type.
233 (In the database, Type is stored as varchar(16).)
241 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
242 (In the database, Type will be stored as a varchar(16).)
248 =head2 IssueStatement
250 Returns the current value of IssueStatement.
251 (In the database, IssueStatement is stored as int(11).)
255 =head2 SetIssueStatement VALUE
258 Set IssueStatement to VALUE.
259 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
260 (In the database, IssueStatement will be stored as a int(11).)
268 Returns the current value of Resolution.
269 (In the database, Resolution is stored as int(11).)
273 =head2 SetResolution VALUE
276 Set Resolution to VALUE.
277 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
278 (In the database, Resolution will be stored as a int(11).)
286 Returns the current value of Owner.
287 (In the database, Owner is stored as int(11).)
291 =head2 SetOwner VALUE
295 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
296 (In the database, Owner will be stored as a int(11).)
304 Returns the current value of Subject.
305 (In the database, Subject is stored as varchar(200).)
309 =head2 SetSubject VALUE
312 Set Subject to VALUE.
313 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
314 (In the database, Subject will be stored as a varchar(200).)
320 =head2 InitialPriority
322 Returns the current value of InitialPriority.
323 (In the database, InitialPriority is stored as int(11).)
327 =head2 SetInitialPriority VALUE
330 Set InitialPriority to VALUE.
331 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
332 (In the database, InitialPriority will be stored as a int(11).)
340 Returns the current value of FinalPriority.
341 (In the database, FinalPriority is stored as int(11).)
345 =head2 SetFinalPriority VALUE
348 Set FinalPriority to VALUE.
349 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
350 (In the database, FinalPriority will be stored as a int(11).)
358 Returns the current value of Priority.
359 (In the database, Priority is stored as int(11).)
363 =head2 SetPriority VALUE
366 Set Priority to VALUE.
367 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
368 (In the database, Priority will be stored as a int(11).)
376 Returns the current value of TimeEstimated.
377 (In the database, TimeEstimated is stored as int(11).)
381 =head2 SetTimeEstimated VALUE
384 Set TimeEstimated to VALUE.
385 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
386 (In the database, TimeEstimated will be stored as a int(11).)
394 Returns the current value of TimeWorked.
395 (In the database, TimeWorked is stored as int(11).)
399 =head2 SetTimeWorked VALUE
402 Set TimeWorked to VALUE.
403 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
404 (In the database, TimeWorked will be stored as a int(11).)
412 Returns the current value of Status.
413 (In the database, Status is stored as varchar(10).)
417 =head2 SetStatus VALUE
421 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
422 (In the database, Status will be stored as a varchar(10).)
430 Returns the current value of TimeLeft.
431 (In the database, TimeLeft is stored as int(11).)
435 =head2 SetTimeLeft VALUE
438 Set TimeLeft to VALUE.
439 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
440 (In the database, TimeLeft will be stored as a int(11).)
448 Returns the current value of Told.
449 (In the database, Told is stored as datetime.)
457 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
458 (In the database, Told will be stored as a datetime.)
466 Returns the current value of Starts.
467 (In the database, Starts is stored as datetime.)
471 =head2 SetStarts VALUE
475 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
476 (In the database, Starts will be stored as a datetime.)
484 Returns the current value of Started.
485 (In the database, Started is stored as datetime.)
489 =head2 SetStarted VALUE
492 Set Started to VALUE.
493 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
494 (In the database, Started will be stored as a datetime.)
502 Returns the current value of Due.
503 (In the database, Due is stored as datetime.)
511 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
512 (In the database, Due will be stored as a datetime.)
520 Returns the current value of Resolved.
521 (In the database, Resolved is stored as datetime.)
525 =head2 SetResolved VALUE
528 Set Resolved to VALUE.
529 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
530 (In the database, Resolved will be stored as a datetime.)
538 Returns the current value of LastUpdatedBy.
539 (In the database, LastUpdatedBy is stored as int(11).)
547 Returns the current value of LastUpdated.
548 (In the database, LastUpdated is stored as datetime.)
556 Returns the current value of Creator.
557 (In the database, Creator is stored as int(11).)
565 Returns the current value of Created.
566 (In the database, Created is stored as datetime.)
574 Returns the current value of Disabled.
575 (In the database, Disabled is stored as smallint(6).)
579 =head2 SetDisabled VALUE
582 Set Disabled to VALUE.
583 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
584 (In the database, Disabled will be stored as a smallint(6).)
591 sub _CoreAccessible {
595 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
597 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
599 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
601 {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
603 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
605 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
607 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
609 {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => '[no subject]'},
611 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
613 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
615 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
617 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
619 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
621 {read => 1, write => 1, sql_type => 12, length => 10, is_blob => 0, is_numeric => 0, type => 'varchar(10)', default => ''},
623 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
625 {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
627 {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
629 {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
631 {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
633 {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
635 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
637 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
639 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
641 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
643 {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
649 eval "require RT::Ticket_Overlay";
650 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Overlay.pm}) {
654 eval "require RT::Ticket_Vendor";
655 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Vendor.pm}) {
659 eval "require RT::Ticket_Local";
660 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Local.pm}) {
669 This class allows "overlay" methods to be placed
670 into the following files _Overlay is for a System overlay by the original author,
671 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
673 These overlay files can contain new subs or subs to replace existing subs in this module.
675 Each of these files should begin with the line
677 no warnings qw(redefine);
679 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
681 RT::Ticket_Overlay, RT::Ticket_Vendor, RT::Ticket_Local