projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT 4.0.13
[freeside.git]
/
rt
/
share
/
html
/
REST
/
1.0
/
Forms
/
ticket
/
default
diff --git
a/rt/share/html/REST/1.0/Forms/ticket/default
b/rt/share/html/REST/1.0/Forms/ticket/default
index
016a50c
..
0bced1e
100755
(executable)
--- a/
rt/share/html/REST/1.0/Forms/ticket/default
+++ b/
rt/share/html/REST/1.0/Forms/ticket/default
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
2
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
3
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-167,7
+167,7
@@
else {
elsif (lc $k eq 'text') {
$text = delete $data{$k};
}
elsif (lc $k eq 'text') {
$text = delete $data{$k};
}
- elsif (
lc $k ne 'id'
) {
+ elsif (
$k !~ /^(?:id|requestors)$/i
) {
$e = 1;
push @$o, $k;
push(@comments, "# $k: Unknown field");
$e = 1;
push @$o, $k;
push(@comments, "# $k: Unknown field");
@@
-188,7
+188,8
@@
else {
MIME::Entity->build(
From => $session{CurrentUser}->EmailAddress,
Subject => $v{Subject},
MIME::Entity->build(
From => $session{CurrentUser}->EmailAddress,
Subject => $v{Subject},
- Data => $text
+ Data => $text,
+ 'X-RT-Interface' => 'REST',
);
}
);
}
@@
-375,11
+376,18
@@
else {
else {
my $vals = $ticket->CustomFieldValues($cf->id);
else {
my $vals = $ticket->CustomFieldValues($cf->id);
- if ( $cf->SingleValue ) {
+ if ( !defined $val || !length $val ) {
+ while ( my $val = $vals->Next ) {
+ ($n, $s) = $ticket->DeleteCustomFieldValue(
+ Field => $cf, ValueId => $val->id,
+ );
+ $s =~ s/^# // if defined $s;
+ }
+ }
+ elsif ( $cf->SingleValue ) {
my $old = $vals->Next;
if ( $old ) {
if ( $val ne $old->Content ) {
my $old = $vals->Next;
if ( $old ) {
if ( $val ne $old->Content ) {
- $old->Delete;
($n, $s) = $ticket->AddCustomFieldValue(
Field => $cf, Value => $val );
$s =~ s/^# // if defined $s;
($n, $s) = $ticket->AddCustomFieldValue(
Field => $cf, Value => $val );
$s =~ s/^# // if defined $s;
@@
-433,7
+441,7
@@
else {
$new{$c}--;
}
else {
$new{$c}--;
}
else {
- $
v->Delete(
);
+ $
ticket->DeleteCustomFieldValue( Field => $cf, ValueId => $v->id
);
}
}
for ( @new ) {
}
}
for ( @new ) {