1 # {{{ BEGIN BPS TAGGED BLOCK
5 # This software is Copyright (c) 1996-2004 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 !!
72 use RT::ScripCondition;
77 @ISA= qw( RT::Record );
82 $self->Table('Scrips');
83 $self->SUPER::_Init(@_);
90 =head2 Create PARAMHASH
92 Create takes a hash of values and creates a row in the database:
94 varchar(255) 'Description'.
95 int(11) 'ScripCondition'.
96 int(11) 'ScripAction'.
97 text 'ConditionRules'.
99 text 'CustomIsApplicableCode'.
100 text 'CustomPrepareCode'.
101 text 'CustomCommitCode'.
115 ScripCondition => '0',
117 ConditionRules => '',
119 CustomIsApplicableCode => '',
120 CustomPrepareCode => '',
121 CustomCommitCode => '',
127 $self->SUPER::Create(
128 Description => $args{'Description'},
129 ScripCondition => $args{'ScripCondition'},
130 ScripAction => $args{'ScripAction'},
131 ConditionRules => $args{'ConditionRules'},
132 ActionRules => $args{'ActionRules'},
133 CustomIsApplicableCode => $args{'CustomIsApplicableCode'},
134 CustomPrepareCode => $args{'CustomPrepareCode'},
135 CustomCommitCode => $args{'CustomCommitCode'},
136 Stage => $args{'Stage'},
137 Queue => $args{'Queue'},
138 Template => $args{'Template'},
147 Returns the current value of id.
148 (In the database, id is stored as int(11).)
156 Returns the current value of Description.
157 (In the database, Description is stored as varchar(255).)
161 =head2 SetDescription VALUE
164 Set Description to VALUE.
165 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
166 (In the database, Description will be stored as a varchar(255).)
172 =head2 ScripCondition
174 Returns the current value of ScripCondition.
175 (In the database, ScripCondition is stored as int(11).)
179 =head2 SetScripCondition VALUE
182 Set ScripCondition to VALUE.
183 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
184 (In the database, ScripCondition will be stored as a int(11).)
190 =head2 ScripConditionObj
192 Returns the ScripCondition Object which has the id returned by ScripCondition
197 sub ScripConditionObj {
199 my $ScripCondition = RT::ScripCondition->new($self->CurrentUser);
200 $ScripCondition->Load($self->__Value('ScripCondition'));
201 return($ScripCondition);
206 Returns the current value of ScripAction.
207 (In the database, ScripAction is stored as int(11).)
211 =head2 SetScripAction VALUE
214 Set ScripAction to VALUE.
215 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
216 (In the database, ScripAction will be stored as a int(11).)
222 =head2 ScripActionObj
224 Returns the ScripAction Object which has the id returned by ScripAction
231 my $ScripAction = RT::ScripAction->new($self->CurrentUser);
232 $ScripAction->Load($self->__Value('ScripAction'));
233 return($ScripAction);
236 =head2 ConditionRules
238 Returns the current value of ConditionRules.
239 (In the database, ConditionRules is stored as text.)
243 =head2 SetConditionRules VALUE
246 Set ConditionRules to VALUE.
247 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
248 (In the database, ConditionRules will be stored as a text.)
256 Returns the current value of ActionRules.
257 (In the database, ActionRules is stored as text.)
261 =head2 SetActionRules VALUE
264 Set ActionRules to VALUE.
265 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
266 (In the database, ActionRules will be stored as a text.)
272 =head2 CustomIsApplicableCode
274 Returns the current value of CustomIsApplicableCode.
275 (In the database, CustomIsApplicableCode is stored as text.)
279 =head2 SetCustomIsApplicableCode VALUE
282 Set CustomIsApplicableCode to VALUE.
283 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
284 (In the database, CustomIsApplicableCode will be stored as a text.)
290 =head2 CustomPrepareCode
292 Returns the current value of CustomPrepareCode.
293 (In the database, CustomPrepareCode is stored as text.)
297 =head2 SetCustomPrepareCode VALUE
300 Set CustomPrepareCode to VALUE.
301 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
302 (In the database, CustomPrepareCode will be stored as a text.)
308 =head2 CustomCommitCode
310 Returns the current value of CustomCommitCode.
311 (In the database, CustomCommitCode is stored as text.)
315 =head2 SetCustomCommitCode VALUE
318 Set CustomCommitCode to VALUE.
319 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
320 (In the database, CustomCommitCode will be stored as a text.)
328 Returns the current value of Stage.
329 (In the database, Stage is stored as varchar(32).)
333 =head2 SetStage VALUE
337 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
338 (In the database, Stage will be stored as a varchar(32).)
346 Returns the current value of Queue.
347 (In the database, Queue is stored as int(11).)
351 =head2 SetQueue VALUE
355 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
356 (In the database, Queue will be stored as a int(11).)
364 Returns the Queue Object which has the id returned by Queue
371 my $Queue = RT::Queue->new($self->CurrentUser);
372 $Queue->Load($self->__Value('Queue'));
378 Returns the current value of Template.
379 (In the database, Template is stored as int(11).)
383 =head2 SetTemplate VALUE
386 Set Template to VALUE.
387 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
388 (In the database, Template will be stored as a int(11).)
396 Returns the Template Object which has the id returned by Template
403 my $Template = RT::Template->new($self->CurrentUser);
404 $Template->Load($self->__Value('Template'));
410 Returns the current value of Creator.
411 (In the database, Creator is stored as int(11).)
419 Returns the current value of Created.
420 (In the database, Created is stored as datetime.)
428 Returns the current value of LastUpdatedBy.
429 (In the database, LastUpdatedBy is stored as int(11).)
437 Returns the current value of LastUpdated.
438 (In the database, LastUpdated is stored as datetime.)
445 sub _CoreAccessible {
449 {read => 1, type => 'int(11)', default => ''},
451 {read => 1, write => 1, type => 'varchar(255)', default => ''},
453 {read => 1, write => 1, type => 'int(11)', default => '0'},
455 {read => 1, write => 1, type => 'int(11)', default => '0'},
457 {read => 1, write => 1, type => 'text', default => ''},
459 {read => 1, write => 1, type => 'text', default => ''},
460 CustomIsApplicableCode =>
461 {read => 1, write => 1, type => 'text', default => ''},
463 {read => 1, write => 1, type => 'text', default => ''},
465 {read => 1, write => 1, type => 'text', default => ''},
467 {read => 1, write => 1, type => 'varchar(32)', default => ''},
469 {read => 1, write => 1, type => 'int(11)', default => '0'},
471 {read => 1, write => 1, type => 'int(11)', default => '0'},
473 {read => 1, auto => 1, type => 'int(11)', default => '0'},
475 {read => 1, auto => 1, type => 'datetime', default => ''},
477 {read => 1, auto => 1, type => 'int(11)', default => '0'},
479 {read => 1, auto => 1, type => 'datetime', default => ''},
485 eval "require RT::Scrip_Overlay";
486 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Overlay.pm}) {
490 eval "require RT::Scrip_Vendor";
491 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Vendor.pm}) {
495 eval "require RT::Scrip_Local";
496 if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Local.pm}) {
505 This class allows "overlay" methods to be placed
506 into the following files _Overlay is for a System overlay by the original author,
507 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
509 These overlay files can contain new subs or subs to replace existing subs in this module.
511 If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
513 no warnings qw(redefine);
515 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
517 RT::Scrip_Overlay, RT::Scrip_Vendor, RT::Scrip_Local