1 # BEGIN BPS TAGGED BLOCK {{{
5 # This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
6 # <sales@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/licenses/old-licenses/gpl-2.0.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 }}}
49 # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
50 # WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
52 # !! DO NOT EDIT THIS FILE !!
75 use RT::ScripCondition;
80 @ISA= qw( RT::Record );
85 $self->Table('Scrips');
86 $self->SUPER::_Init(@_);
93 =head2 Create PARAMHASH
95 Create takes a hash of values and creates a row in the database:
97 varchar(255) 'Description'.
98 int(11) 'ScripCondition'.
99 int(11) 'ScripAction'.
100 text 'ConditionRules'.
102 text 'CustomIsApplicableCode'.
103 text 'CustomPrepareCode'.
104 text 'CustomCommitCode'.
118 ScripCondition => '0',
120 ConditionRules => '',
122 CustomIsApplicableCode => '',
123 CustomPrepareCode => '',
124 CustomCommitCode => '',
130 $self->SUPER::Create(
131 Description => $args{'Description'},
132 ScripCondition => $args{'ScripCondition'},
133 ScripAction => $args{'ScripAction'},
134 ConditionRules => $args{'ConditionRules'},
135 ActionRules => $args{'ActionRules'},
136 CustomIsApplicableCode => $args{'CustomIsApplicableCode'},
137 CustomPrepareCode => $args{'CustomPrepareCode'},
138 CustomCommitCode => $args{'CustomCommitCode'},
139 Stage => $args{'Stage'},
140 Queue => $args{'Queue'},
141 Template => $args{'Template'},
150 Returns the current value of id.
151 (In the database, id is stored as int(11).)
159 Returns the current value of Description.
160 (In the database, Description is stored as varchar(255).)
164 =head2 SetDescription VALUE
167 Set Description to VALUE.
168 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
169 (In the database, Description will be stored as a varchar(255).)
175 =head2 ScripCondition
177 Returns the current value of ScripCondition.
178 (In the database, ScripCondition is stored as int(11).)
182 =head2 SetScripCondition VALUE
185 Set ScripCondition to VALUE.
186 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
187 (In the database, ScripCondition will be stored as a int(11).)
193 =head2 ScripConditionObj
195 Returns the ScripCondition Object which has the id returned by ScripCondition
200 sub ScripConditionObj {
202 my $ScripCondition = RT::ScripCondition->new($self->CurrentUser);
203 $ScripCondition->Load($self->__Value('ScripCondition'));
204 return($ScripCondition);
209 Returns the current value of ScripAction.
210 (In the database, ScripAction is stored as int(11).)
214 =head2 SetScripAction VALUE
217 Set ScripAction to VALUE.
218 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
219 (In the database, ScripAction will be stored as a int(11).)
225 =head2 ScripActionObj
227 Returns the ScripAction Object which has the id returned by ScripAction
234 my $ScripAction = RT::ScripAction->new($self->CurrentUser);
235 $ScripAction->Load($self->__Value('ScripAction'));
236 return($ScripAction);
239 =head2 ConditionRules
241 Returns the current value of ConditionRules.
242 (In the database, ConditionRules is stored as text.)
246 =head2 SetConditionRules VALUE
249 Set ConditionRules to VALUE.
250 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
251 (In the database, ConditionRules will be stored as a text.)
259 Returns the current value of ActionRules.
260 (In the database, ActionRules is stored as text.)
264 =head2 SetActionRules VALUE
267 Set ActionRules to VALUE.
268 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
269 (In the database, ActionRules will be stored as a text.)
275 =head2 CustomIsApplicableCode
277 Returns the current value of CustomIsApplicableCode.
278 (In the database, CustomIsApplicableCode is stored as text.)
282 =head2 SetCustomIsApplicableCode VALUE
285 Set CustomIsApplicableCode to VALUE.
286 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
287 (In the database, CustomIsApplicableCode will be stored as a text.)
293 =head2 CustomPrepareCode
295 Returns the current value of CustomPrepareCode.
296 (In the database, CustomPrepareCode is stored as text.)
300 =head2 SetCustomPrepareCode VALUE
303 Set CustomPrepareCode to VALUE.
304 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
305 (In the database, CustomPrepareCode will be stored as a text.)
311 =head2 CustomCommitCode
313 Returns the current value of CustomCommitCode.
314 (In the database, CustomCommitCode is stored as text.)
318 =head2 SetCustomCommitCode VALUE
321 Set CustomCommitCode to VALUE.
322 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
323 (In the database, CustomCommitCode will be stored as a text.)
331 Returns the current value of Stage.
332 (In the database, Stage is stored as varchar(32).)
336 =head2 SetStage VALUE
340 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
341 (In the database, Stage will be stored as a varchar(32).)
349 Returns the current value of Queue.
350 (In the database, Queue is stored as int(11).)
354 =head2 SetQueue VALUE
358 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
359 (In the database, Queue will be stored as a int(11).)
367 Returns the Queue Object which has the id returned by Queue
374 my $Queue = RT::Queue->new($self->CurrentUser);
375 $Queue->Load($self->__Value('Queue'));
381 Returns the current value of Template.
382 (In the database, Template is stored as int(11).)
386 =head2 SetTemplate VALUE
389 Set Template to VALUE.
390 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
391 (In the database, Template will be stored as a int(11).)
399 Returns the Template Object which has the id returned by Template
406 my $Template = RT::Template->new($self->CurrentUser);
407 $Template->Load($self->__Value('Template'));
413 Returns the current value of Creator.
414 (In the database, Creator is stored as int(11).)
422 Returns the current value of Created.
423 (In the database, Created is stored as datetime.)
431 Returns the current value of LastUpdatedBy.
432 (In the database, LastUpdatedBy is stored as int(11).)
440 Returns the current value of LastUpdated.
441 (In the database, LastUpdated is stored as datetime.)
448 sub _CoreAccessible {
452 {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
454 {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
456 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
458 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
460 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
462 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
463 CustomIsApplicableCode =>
464 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
466 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
468 {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
470 {read => 1, write => 1, sql_type => 12, length => 32, is_blob => 0, is_numeric => 0, type => 'varchar(32)', default => ''},
472 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
474 {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
476 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
478 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
480 {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
482 {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
487 RT::Base->_ImportOverlays();
491 This class allows "overlay" methods to be placed
492 into the following files _Overlay is for a System overlay by the original author,
493 _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
495 These overlay files can contain new subs or subs to replace existing subs in this module.
497 Each of these files should begin with the line
499 no warnings qw(redefine);
501 so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
503 RT::Scrip_Overlay, RT::Scrip_Vendor, RT::Scrip_Local