diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 28b4bfd0b..0e10adf00 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,7 @@ - fixed #11351: Double submits on ITransact checkout - fixed #11353: shop - sales - error - fixed #11355: Duplicate template error + - fixed #11347: copy forum 7.8.9 - fixed #11235: wiki search diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index afb2e985a..d4c0a7763 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -932,7 +932,8 @@ sub definition { =head2 duplicate -Extend the base method to handle making a subscription group for the new CS. +Extend the base method to handle making a subscription group for the new CS, and +to build a new Cron job. It also recalculates the number of threads and replies. =cut @@ -949,8 +950,24 @@ sub duplicate { parameters=>$self->getId, workflowId=>"csworkflow000000000001" }); - $self->update({getMailCronId=>$newCron->getId}); - return $newAsset; + $newAsset->update({getMailCronId=>$newCron->getId}); + $newAsset->incrementReplies('',''); + return $newAsset; +} + +#------------------------------------------------------------------- + +=head2 duplicateBranch. + +Extend the base method to recalculate the number of threads and replies. + +=cut + +sub duplicateBranch { + my $self = shift; + my $newAsset = $self->next::method(@_); + $newAsset->incrementReplies('',''); + return $newAsset; } #-------------------------------------------------------------------