Make a new storage location when an Event is duplicated. Fixes bug #11937.
This commit is contained in:
parent
1c63a65377
commit
04ec75719e
3 changed files with 28 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue