diff options
author | Mark Wells <mark@freeside.biz> | 2013-01-18 17:42:01 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-01-18 17:42:01 -0800 |
commit | 576d11eecd4aac143ac5d103b056060e2baaf4ed (patch) | |
tree | 44861af92953694c34a0f8a2fcae4d4d78d785ad /rt/lib | |
parent | 1fbe9c841ebb293b516dfa4d2611a5cd1a1cf5c5 (diff) |
avoid cloning TimeWorked and related fields on linked tickets, #20543
Diffstat (limited to 'rt/lib')
-rw-r--r-- | rt/lib/RT/CustomField.pm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/rt/lib/RT/CustomField.pm b/rt/lib/RT/CustomField.pm index 7ba24b8..8d16c1f 100644 --- a/rt/lib/RT/CustomField.pm +++ b/rt/lib/RT/CustomField.pm @@ -410,6 +410,10 @@ sub Create { $self->SetUILocation( $args{'UILocation'} ); } + if ( exists $args{'NoClone'} ) { + $self->SetNoClone( $args{'NoClone'} ); + } + return ($rv, $msg) unless exists $args{'Queue'}; # Compat code -- create a new ObjectCustomField mapping @@ -1822,9 +1826,20 @@ sub SetUILocation { } } +sub NoClone { + my $self = shift; + $self->FirstAttribute('NoClone') ? 1 : ''; +} - - +sub SetNoClone { + my $self = shift; + my $value = shift; + if ( $value ) { + return $self->SetAttribute( Name => 'NoClone', Content => 1 ); + } else { + return $self->DeleteAttribute('NoClone'); + } +} =head2 id |