Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set the fields more directly

The "normal" accessors don't actually take arguments, they just
mean Me and Now
  • Loading branch information...
commit 828dca5f60f0bd5f8620a8d4dcd59f75550f12da 1 parent a6846eb
@afresh1 authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 rt-ticket-importer
View
10 rt-ticket-importer
@@ -155,14 +155,10 @@ sub _ConvertItem {
foreach my $key (qw( LastUpdatedBy LastUpdated )) {
my $value = $item->{$key} or next;
+ $value = ConvertUser($value) if $key eq 'LastUpdatedBy';
- $value = ConvertUser($value)
- if $key eq 'Creator' or $key eq 'LastUpdatedBy';
-
- my $method = "Set$key";
- $obj->{_AccessibleCache}{$key}
- = { read => 1, write => 1, auto => 0 };
- $obj->$method($value);
+ # Annoying to dig into the guts this far!
+ $obj->__Set( Field => $key, Value => $value );
}
return $new_id;
Please sign in to comment.
Something went wrong with that request. Please try again.