X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FREST%2F1.0%2FForms%2Fqueue%2Fdefault;h=fc967090f94ab7d7b253ef7bb829b6e59801512b;hb=187086c479a09629b7d180eec513fb7657f4e291;hp=d42fef9c358c0519673d0738772fddd8ccae4f71;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/REST/1.0/Forms/queue/default b/rt/share/html/REST/1.0/Forms/queue/default index d42fef9c3..fc967090f 100755 --- a/rt/share/html/REST/1.0/Forms/queue/default +++ b/rt/share/html/REST/1.0/Forms/queue/default @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2018 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -57,9 +57,14 @@ $changes => {} my @comments; my ($c, $o, $k, $e) = ("", [], {}, 0); my %data = %$changes; -my $queue = new RT::Queue $session{CurrentUser}; -my @fields = qw(Name Description CorrespondAddress CommentAddress - InitialPriority FinalPriority DefaultDueIn); +my $queue = RT::Queue->new($session{CurrentUser}); + +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') { @@ -146,7 +151,7 @@ if ( keys %data == 0) { } else { my ($get, $set, $key, $val, $n, $s); - + my $updated; foreach $key (keys %data) { $val = $data{$key}; $key = lc $key; @@ -175,9 +180,12 @@ else { $k = $changes; } } + else { + $updated ||= 1; + } } - push(@comments, "# Queue $id updated.") unless $n == 0; + push(@comments, "# Queue $id updated.") if $updated; } DONE: