3 # Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 # (Except where explictly superceded by other copyright notices)
7 # This work is made available to you under the terms of Version 2 of
8 # the GNU General Public License. A copy of that license should have
9 # been provided with this software, but in any event can be snarfed
12 # This work is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # Unless otherwise specified, all modifications, corrections or
18 # extensions to this work which alter its source code become the
19 # property of Best Practical Solutions, LLC when submitted for
20 # inclusion in the work.
24 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
25 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
27 # !! DO NOT EDIT THIS FILE !!
52 @ISA= qw( RT::Record );
57 $self->Table('Tickets');
58 $self->SUPER::_Init(@_);
65 =item Create PARAMHASH
67 Create takes a hash of values and creates a row in the database:
69 int(11) 'EffectiveId'.
72 int(11) 'IssueStatement'.
75 varchar(200) 'Subject' defaults to '[no subject]'.
76 int(11) 'InitialPriority'.
77 int(11) 'FinalPriority'.
79 int(11) 'TimeEstimated'.
88 smallint(6) 'Disabled'.
101 IssueStatement => '0',
104 Subject => '[no subject]',
105 InitialPriority => '0',
106 FinalPriority => '0',
108 TimeEstimated => '0',
120 $self->SUPER::Create(
121 EffectiveId => $args{'EffectiveId'},
122 Queue => $args{'Queue'},
123 Type => $args{'Type'},
124 IssueStatement => $args{'IssueStatement'},
125 Resolution => $args{'Resolution'},
126 Owner => $args{'Owner'},
127 Subject => $args{'Subject'},
128 InitialPriority => $args{'InitialPriority'},
129 FinalPriority => $args{'FinalPriority'},
130 Priority => $args{'Priority'},
131 TimeEstimated => $args{'TimeEstimated'},
132 TimeWorked => $args{'TimeWorked'},
133 Status => $args{'Status'},
134 TimeLeft => $args{'TimeLeft'},
135 Told => $args{'Told'},
136 Starts => $args{'Starts'},
137 Started => $args{'Started'},
139 Resolved => $args{'Resolved'},
140 Disabled => $args{'Disabled'},
149 Returns the current value of id.
150 (In the database, id is stored as int(11).)
158 Returns the current value of EffectiveId.
159 (In the database, EffectiveId is stored as int(11).)
163 =item SetEffectiveId VALUE
166 Set EffectiveId to VALUE.
167 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
168 (In the database, EffectiveId will be stored as a int(11).)
176 Returns the current value of Queue.
177 (In the database, Queue is stored as int(11).)
185 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
186 (In the database, Queue will be stored as a int(11).)
194 Returns the Queue Object which has the id returned by Queue
201 my $Queue = RT::Queue->new($self->CurrentUser);
202 $Queue->Load($self->__Value('Queue'));
208 Returns the current value of Type.
209 (In the database, Type is stored as varchar(16).)
217 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
218 (In the database, Type will be stored as a varchar(16).)
226 Returns the current value of IssueStatement.
227 (In the database, IssueStatement is stored as int(11).)
231 =item SetIssueStatement VALUE
234 Set IssueStatement to VALUE.
235 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
236 (In the database, IssueStatement will be stored as a int(11).)
244 Returns the current value of Resolution.
245 (In the database, Resolution is stored as int(11).)
249 =item SetResolution VALUE
252 Set Resolution to VALUE.
253 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
254 (In the database, Resolution will be stored as a int(11).)
262 Returns the current value of Owner.
263 (In the database, Owner is stored as int(11).)
271 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
272 (In the database, Owner will be stored as a int(11).)
280 Returns the current value of Subject.
281 (In the database, Subject is stored as varchar(200).)
285 =item SetSubject VALUE
288 Set Subject to VALUE.
289 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
290 (In the database, Subject will be stored as a varchar(200).)
296 =item InitialPriority
298 Returns the current value of InitialPriority.
299 (In the database, InitialPriority is stored as int(11).)
303 =item SetInitialPriority VALUE
306 Set InitialPriority to VALUE.
307 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
308 (In the database, InitialPriority will be stored as a int(11).)
316 Returns the current value of FinalPriority.
317 (In the database, FinalPriority is stored as int(11).)
321 =item SetFinalPriority VALUE
324 Set FinalPriority to VALUE.
325 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
326 (In the database, FinalPriority will be stored as a int(11).)
334 Returns the current value of Priority.
335 (In the database, Priority is stored as int(11).)
339 =item SetPriority VALUE
342 Set Priority to VALUE.
343 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
344 (In the database, Priority will be stored as a int(11).)
352 Returns the current value of TimeEstimated.
353 (In the database, TimeEstimated is stored as int(11).)
357 =item SetTimeEstimated VALUE
360 Set TimeEstimated to VALUE.
361 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
362 (In the database, TimeEstimated will be stored as a int(11).)
370 Returns the current value of TimeWorked.
371 (In the database, TimeWorked is stored as int(11).)
375 =item SetTimeWorked VALUE
378 Set TimeWorked to VALUE.
379 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
380 (In the database, TimeWorked will be stored as a int(11).)
388 Returns the current value of Status.
389 (In the database, Status is stored as varchar(10).)
393 =item SetStatus VALUE
397 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
398 (In the database, Status will be stored as a varchar(10).)
406 Returns the current value of TimeLeft.
407 (In the database, TimeLeft is stored as int(11).)
411 =item SetTimeLeft VALUE
414 Set TimeLeft to VALUE.
415 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
416 (In the database, TimeLeft will be stored as a int(11).)
424 Returns the current value of Told.
425 (In the database, Told is stored as datetime.)
433 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
434 (In the database, Told will be stored as a datetime.)
442 Returns the current value of Starts.
443 (In the database, Starts is stored as datetime.)
447 =item SetStarts VALUE
451 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
452 (In the database, Starts will be stored as a datetime.)
460 Returns the current value of Started.
461 (In the database, Started is stored as datetime.)
465 =item SetStarted VALUE
468 Set Started to VALUE.
469 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
470 (In the database, Started will be stored as a datetime.)
478 Returns the current value of Due.
479 (In the database, Due is stored as datetime.)
487 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
488 (In the database, Due will be stored as a datetime.)
496 Returns the current value of Resolved.
497 (In the database, Resolved is stored as datetime.)
501 =item SetResolved VALUE
504 Set Resolved to VALUE.
505 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
506 (In the database, Resolved will be stored as a datetime.)
514 Returns the current value of LastUpdatedBy.
515 (In the database, LastUpdatedBy is stored as int(11).)
523 Returns the current value of LastUpdated.
524 (In the database, LastUpdated is stored as datetime.)
532 Returns the current value of Creator.
533 (In the database, Creator is stored as int(11).)
541 Returns the current value of Created.
542 (In the database, Created is stored as datetime.)
550 Returns the current value of Disabled.
551 (In the database, Disabled is stored as smallint(6).)
555 =item SetDisabled VALUE
558 Set Disabled to VALUE.
559 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
560 (In the database, Disabled will be stored as a smallint(6).)
567 sub _ClassAccessible {
571 {read => 1, type => 'int(11)', default => ''},
573 {read => 1, write => 1, type => 'int(11)', default => '0'},
575 {read => 1, write => 1, type => 'int(11)', default => '0'},
577 {read => 1, write => 1, type => 'varchar(16)', default => ''},
579 {read => 1, write => 1, type => 'int(11)', default => '0'},
581 {read => 1, write => 1, type => 'int(11)', default => '0'},
583 {read => 1, write => 1, type => 'int(11)', default => '0'},
585 {read => 1, write => 1, type => 'varchar(200)', default => '[no subject]'},
587 {read => 1, write => 1, type => 'int(11)', default => '0'},
589 {read => 1, write => 1, type => 'int(11)', default => '0'},
591 {read => 1, write => 1, type => 'int(11)', default => '0'},
593 {read => 1, write => 1, type => 'int(11)', default => '0'},
595 {read => 1, write => 1, type => 'int(11)', default => '0'},
597 {read => 1, write => 1, type => 'varchar(10)', default => ''},
599 {read => 1, write => 1, type => 'int(11)', default => '0'},
601 {read => 1, write => 1, type => 'datetime', default => ''},
603 {read => 1, write => 1, type => 'datetime', default => ''},
605 {read => 1, write => 1, type => 'datetime', default => ''},
607 {read => 1, write => 1, type => 'datetime', default => ''},
609 {read => 1, write => 1, type => 'datetime', default => ''},
611 {read => 1, auto => 1, type => 'int(11)', default => '0'},
613 {read => 1, auto => 1, type => 'datetime', default => ''},
615 {read => 1, auto => 1, type => 'int(11)', default => '0'},
617 {read => 1, auto => 1, type => 'datetime', default => ''},
619 {read => 1, write => 1, type => 'smallint(6)', default => '0'},
625 eval "require RT::Ticket_Overlay";
626 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Overlay.pm}) {
630 eval "require RT::Ticket_Vendor";
631 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Vendor.pm}) {
635 eval "require RT::Ticket_Local";
636 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Local.pm}) {
645 This class allows "overlay" methods to be placed
646 into the following files _Overlay is for a System overlay by the original author,
647 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
649 These overlay files can contain new subs or subs to replace existing subs in this module.
651 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
653 no warnings qw(redefine);
655 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
657 RT::Ticket_Overlay, RT::Ticket_Vendor, RT::Ticket_Local