X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FBulk.html;h=8c5d642d28ae43fe955af5c272b3d71ddfea14ba;hb=c71b2dc296da6207c525a064d322f7153c284d4e;hp=38ca642489017db444c0278fa6d27067911895a8;hpb=b95256aad16c4bdafd089d26c0f9147f3ec7755e;p=freeside.git 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) ) {