diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2014-08-21 00:48:07 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2014-08-21 00:48:07 -0700 |
| commit | c71b2dc296da6207c525a064d322f7153c284d4e (patch) | |
| tree | ddbc43665029b8b92db4e18b8198c7f848519010 /rt/share/html/Search | |
| parent | b95256aad16c4bdafd089d26c0f9147f3ec7755e (diff) | |
rt 4.0.21 (RT#13852)
Diffstat (limited to 'rt/share/html/Search')
| -rwxr-xr-x | rt/share/html/Search/Bulk.html | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/rt/share/html/Search/Bulk.html b/rt/share/html/Search/Bulk.html index 38ca64248..8c5d642d2 100755 --- a/rt/share/html/Search/Bulk.html +++ b/rt/share/html/Search/Bulk.html @@ -388,24 +388,14 @@ unless ( $ARGS{'AddMoreAttach'} ) { foreach my $value (@values) { - # Convert for timezone. Without converstion, - # HasEntry and DeleteCustomFieldValue fail because - # the value in the DB is converted. - if ( $op eq 'del' - && ($cf->Type eq 'DateTime' || $cf->Type eq 'Date') ){ - my $DateObj = RT::Date->new( $session{'CurrentUser'} ); - $DateObj->Set( Format => 'unknown', - Value => $value ); - $value = $cf->Type eq 'DateTime' ? $DateObj->ISO - : $DateObj->ISO(Time => 0, Seconds => 0); - } - - if ( $op eq 'del' && $current_values->HasEntry($value) ) { - my ( $id, $msg ) = $Ticket->DeleteCustomFieldValue( - Field => $cfid, - Value => $value - ); - push @cfresults, $msg; + if ( $op eq 'del' ) { + if ( my $entry = $current_values->HasEntry($value) ) { + my ( $id, $msg ) = $Ticket->DeleteCustomFieldValue( + Field => $cfid, + ValueId => $entry->id, + ); + push @cfresults, $msg; + } } elsif ( $op eq 'add' && !$current_values->HasEntry($value) ) { |
