1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2005 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., 675 Mass Ave, Cambridge, MA 02139, USA.
28 # CONTRIBUTION SUBMISSION POLICY:
30 # (The following paragraph is not intended to limit the rights granted
31 # to you to modify and distribute this software under the terms of
32 # the GNU General Public License and is only of importance to you if
33 # you choose to contribute your changes and enhancements to the
34 # community by submitting them to Best Practical Solutions, LLC.)
36 # By intentionally submitting any modifications, corrections or
37 # derivatives to this work, or any other work intended for use with
38 # Request Tracker, to Best Practical Solutions, LLC, you confirm that
39 # you are the copyright holder for those contributions and you grant
40 # Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
41 # royalty-free, perpetual, license to use, copy, create derivative
42 # works based on those contributions, and sublicense and distribute
43 # those contributions and any derivatives thereof.
45 # END BPS TAGGED BLOCK }}}
46 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
47 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
49 # !! DO NOT EDIT THIS FILE !!
74 @ISA= qw( RT::Record );
79 $self->Table('Tickets');
80 $self->SUPER::_Init(@_);
87 =head2 Create PARAMHASH
89 Create takes a hash of values and creates a row in the database:
91 int(11) 'EffectiveId'.
94 int(11) 'IssueStatement'.
97 varchar(200) 'Subject' defaults to '[no subject]'.
98 int(11) 'InitialPriority'.
99 int(11) 'FinalPriority'.
101 int(11) 'TimeEstimated'.
102 int(11) 'TimeWorked'.
103 varchar(10) 'Status'.
110 smallint(6) 'Disabled'.
123 IssueStatement => '0',
126 Subject => '[no subject]',
127 InitialPriority => '0',
128 FinalPriority => '0',
130 TimeEstimated => '0',
142 $self->SUPER::Create(
143 EffectiveId => $args{'EffectiveId'},
144 Queue => $args{'Queue'},
145 Type => $args{'Type'},
146 IssueStatement => $args{'IssueStatement'},
147 Resolution => $args{'Resolution'},
148 Owner => $args{'Owner'},
149 Subject => $args{'Subject'},
150 InitialPriority => $args{'InitialPriority'},
151 FinalPriority => $args{'FinalPriority'},
152 Priority => $args{'Priority'},
153 TimeEstimated => $args{'TimeEstimated'},
154 TimeWorked => $args{'TimeWorked'},
155 Status => $args{'Status'},
156 TimeLeft => $args{'TimeLeft'},
157 Told => $args{'Told'},
158 Starts => $args{'Starts'},
159 Started => $args{'Started'},
161 Resolved => $args{'Resolved'},
162 Disabled => $args{'Disabled'},
171 Returns the current value of id.
172 (In the database, id is stored as int(11).)
180 Returns the current value of EffectiveId.
181 (In the database, EffectiveId is stored as int(11).)
185 =head2 SetEffectiveId VALUE
188 Set EffectiveId to VALUE.
189 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
190 (In the database, EffectiveId will be stored as a int(11).)
198 Returns the current value of Queue.
199 (In the database, Queue is stored as int(11).)
203 =head2 SetQueue VALUE
207 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
208 (In the database, Queue will be stored as a int(11).)
216 Returns the Queue Object which has the id returned by Queue
223 my $Queue = RT::Queue->new($self->CurrentUser);
224 $Queue->Load($self->__Value('Queue'));
230 Returns the current value of Type.
231 (In the database, Type is stored as varchar(16).)
239 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
240 (In the database, Type will be stored as a varchar(16).)
246 =head2 IssueStatement
248 Returns the current value of IssueStatement.
249 (In the database, IssueStatement is stored as int(11).)
253 =head2 SetIssueStatement VALUE
256 Set IssueStatement to VALUE.
257 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
258 (In the database, IssueStatement will be stored as a int(11).)
266 Returns the current value of Resolution.
267 (In the database, Resolution is stored as int(11).)
271 =head2 SetResolution VALUE
274 Set Resolution to VALUE.
275 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
276 (In the database, Resolution will be stored as a int(11).)
284 Returns the current value of Owner.
285 (In the database, Owner is stored as int(11).)
289 =head2 SetOwner VALUE
293 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
294 (In the database, Owner will be stored as a int(11).)
302 Returns the current value of Subject.
303 (In the database, Subject is stored as varchar(200).)
307 =head2 SetSubject VALUE
310 Set Subject to VALUE.
311 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
312 (In the database, Subject will be stored as a varchar(200).)
318 =head2 InitialPriority
320 Returns the current value of InitialPriority.
321 (In the database, InitialPriority is stored as int(11).)
325 =head2 SetInitialPriority VALUE
328 Set InitialPriority to VALUE.
329 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
330 (In the database, InitialPriority will be stored as a int(11).)
338 Returns the current value of FinalPriority.
339 (In the database, FinalPriority is stored as int(11).)
343 =head2 SetFinalPriority VALUE
346 Set FinalPriority to VALUE.
347 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
348 (In the database, FinalPriority will be stored as a int(11).)
356 Returns the current value of Priority.
357 (In the database, Priority is stored as int(11).)
361 =head2 SetPriority VALUE
364 Set Priority to VALUE.
365 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
366 (In the database, Priority will be stored as a int(11).)
374 Returns the current value of TimeEstimated.
375 (In the database, TimeEstimated is stored as int(11).)
379 =head2 SetTimeEstimated VALUE
382 Set TimeEstimated to VALUE.
383 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
384 (In the database, TimeEstimated will be stored as a int(11).)
392 Returns the current value of TimeWorked.
393 (In the database, TimeWorked is stored as int(11).)
397 =head2 SetTimeWorked VALUE
400 Set TimeWorked to VALUE.
401 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
402 (In the database, TimeWorked will be stored as a int(11).)
410 Returns the current value of Status.
411 (In the database, Status is stored as varchar(10).)
415 =head2 SetStatus VALUE
419 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
420 (In the database, Status will be stored as a varchar(10).)
428 Returns the current value of TimeLeft.
429 (In the database, TimeLeft is stored as int(11).)
433 =head2 SetTimeLeft VALUE
436 Set TimeLeft to VALUE.
437 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
438 (In the database, TimeLeft will be stored as a int(11).)
446 Returns the current value of Told.
447 (In the database, Told is stored as datetime.)
455 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
456 (In the database, Told will be stored as a datetime.)
464 Returns the current value of Starts.
465 (In the database, Starts is stored as datetime.)
469 =head2 SetStarts VALUE
473 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
474 (In the database, Starts will be stored as a datetime.)
482 Returns the current value of Started.
483 (In the database, Started is stored as datetime.)
487 =head2 SetStarted VALUE
490 Set Started to VALUE.
491 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
492 (In the database, Started will be stored as a datetime.)
500 Returns the current value of Due.
501 (In the database, Due is stored as datetime.)
509 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
510 (In the database, Due will be stored as a datetime.)
518 Returns the current value of Resolved.
519 (In the database, Resolved is stored as datetime.)
523 =head2 SetResolved VALUE
526 Set Resolved to VALUE.
527 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
528 (In the database, Resolved will be stored as a datetime.)
536 Returns the current value of LastUpdatedBy.
537 (In the database, LastUpdatedBy is stored as int(11).)
545 Returns the current value of LastUpdated.
546 (In the database, LastUpdated is stored as datetime.)
554 Returns the current value of Creator.
555 (In the database, Creator is stored as int(11).)
563 Returns the current value of Created.
564 (In the database, Created is stored as datetime.)
572 Returns the current value of Disabled.
573 (In the database, Disabled is stored as smallint(6).)
577 =head2 SetDisabled VALUE
580 Set Disabled to VALUE.
581 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
582 (In the database, Disabled will be stored as a smallint(6).)
589 sub _CoreAccessible {
593 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
595 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
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 => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
601 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
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 => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => '[no subject]'},
609 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
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 => 12, length => 10, is_blob => 0, is_numeric => 0, type => 'varchar(10)', default => ''},
621 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
623 {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
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, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
635 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
637 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
639 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
641 {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
647 eval "require RT::Ticket_Overlay";
648 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Overlay.pm}) {
652 eval "require RT::Ticket_Vendor";
653 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Vendor.pm}) {
657 eval "require RT::Ticket_Local";
658 if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Local.pm}) {
667 This class allows "overlay" methods to be placed
668 into the following files _Overlay is for a System overlay by the original author,
669 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
671 These overlay files can contain new subs or subs to replace existing subs in this module.
673 Each of these files should begin with the line
675 no warnings qw(redefine);
677 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
679 RT::Ticket_Overlay, RT::Ticket_Vendor, RT::Ticket_Local