diff options
| author | Mark Wells <mark@freeside.biz> | 2015-07-13 20:55:30 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2015-07-13 20:55:39 -0700 |
| commit | 509767cdde6504eb82120187cfb4b73d9d5cb6f0 (patch) | |
| tree | 7070da68a8c87f7572078f6e514f779157269a68 /rt/lib/RT/Condition | |
| parent | 1072419d5b3ac39246017614ab312fba3a9bd7a0 (diff) | |
remove "create ticket on custom field change" (#10139) to avoid conflicts with RT 4.2
Diffstat (limited to 'rt/lib/RT/Condition')
| -rw-r--r-- | rt/lib/RT/Condition/CustomFieldChange.pm | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/rt/lib/RT/Condition/CustomFieldChange.pm b/rt/lib/RT/Condition/CustomFieldChange.pm deleted file mode 100644 index b9228a50f..000000000 --- a/rt/lib/RT/Condition/CustomFieldChange.pm +++ /dev/null @@ -1,56 +0,0 @@ -package RT::Condition::CustomFieldChange; -use base 'RT::Condition'; -use strict; - -=head2 IsApplicable - -If a custom field has a particular value. - -=cut - -# Based on Chuck Boeheim's code posted on the RT Wiki 3/13/06 - -sub IsApplicable { - my $self = shift; - my $trans = $self->TransactionObj; - my $scrip = $self->ScripObj; - my %Rules = $self->Rules; - my ($field, $value) = @Rules{'field', 'value'}; - return if !defined($field) or !defined($value); - - if ($trans->Type eq 'Create') { - return 1 if $trans->TicketObj->FirstCustomFieldValue($field) eq $value; - } - if ($trans->Type eq 'CustomField') { - my $cf = RT::CustomField->new($self->CurrentUser); - $cf->Load($field); - return 1 if $trans->Field == $cf->Id and $trans->NewValue eq $value; - } - return undef; -} - -sub Options { - my $self = shift; - my %args = ( 'QueueObj' => undef, @_ ); - my $QueueObj = $args{'QueueObj'}; - my $cfs = $QueueObj->TicketCustomFields(); - my @fieldnames; - while ( my $cf = $cfs->Next ) { - push @fieldnames, $cf->Name, $cf->Name; - } - return ( - { - 'name' => 'field', - 'label' => 'Custom Field', - 'type' => 'select', - 'options' => \@fieldnames, - }, - { - 'name' => 'value', - 'label' => 'Value', - 'type' => 'text', - }, - ); -} -1; - |
