Make a new storage location when an Event is duplicated. Fixes bug #11937.

This commit is contained in:
Colin Kuskie 2010-11-01 09:19:08 -07:00
parent 1c63a65377
commit 04ec75719e
3 changed files with 28 additions and 1 deletions

View file

@ -360,6 +360,22 @@ sub canEdit {
#-------------------------------------------------------------------
=head2 duplicate ( )
Extend the super class to duplicate the storage location.
=cut
sub duplicate {
my $self = shift;
my $newAsset = $self->SUPER::duplicate(@_);
my $newStorage = $self->getStorageLocation->copy;
$newAsset->update({storageId=>$newStorage->getId});
return $newAsset;
}
#-------------------------------------------------------------------
=head2 generateRecurrence (date)
Creates an recurrence event in the parent calendar for the given date