%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
my ($c, $o, $k, $e) = ("", [], {}, 0);
my %data = %$changes;
my $queue = RT::Queue->new($session{CurrentUser});
-my @fields = qw(Name Description CorrespondAddress CommentAddress
- InitialPriority FinalPriority DefaultDueIn);
+
+my @fields =
+ qw(Name Description CorrespondAddress CommentAddress InitialPriority FinalPriority DefaultDueIn Disabled);
+if ( $fields && %$fields ) {
+ @fields = grep { exists $fields->{ lc $_ } } @fields;
+}
+
my %fields = map { lc $_ => $_ } @fields;
if ($id ne 'new') {
}
else {
my ($get, $set, $key, $val, $n, $s);
-
+ my $updated;
foreach $key (keys %data) {
$val = $data{$key};
$key = lc $key;
$k = $changes;
}
}
+ else {
+ $updated ||= 1;
+ }
}
- push(@comments, "# Queue $id updated.") unless $n == 0;
+ push(@comments, "# Queue $id updated.") if $updated;
}
DONE: