[Rt-commit] rt branch, 4.0/cf-repeated-values, updated. rt-4.0.20-3-ge03fff3
? sunnavy
sunnavy at bestpractical.com
Mon May 19 08:44:35 EDT 2014
The branch, 4.0/cf-repeated-values has been updated
via e03fff3d75acc2763d1e4d20855b96f142849639 (commit)
from 85315d8826d2bb47f91670097a5be339e17e7c1c (commit)
Summary of changes:
share/html/Search/Bulk.html | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
- Log -----------------------------------------------------------------
commit e03fff3d75acc2763d1e4d20855b96f142849639
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon May 19 19:10:08 2014 +0800
HasEntry canonicalize values now, so no need to explicitly do that any more
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index 593309a..165d844 100644
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -375,24 +375,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) ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list