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:30 -0700 |
| commit | d0b51206d9d8ba21b820df6be0a342179fea68aa (patch) | |
| tree | ebaf2dbe8f92cc605f9bd6e7b5c14e1980cea47d /rt/lib/RT/Condition | |
| parent | 204aaf4c7b3ba6a2416a4133ba0079305b4f4bdc (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; - |
