Do not extend recurrent for events in the trash. Do not extend them in the clipboard either, since it'll either make a mess in the clipboard or pop them up on the calendar automatically. Fixes bug #11995
This commit is contained in:
parent
b911f05125
commit
a083737ab3
3 changed files with 41 additions and 2 deletions
|
|
@ -41,9 +41,26 @@ my $event = $calendar->addChild(
|
|||
}, undef, undef, {skipAutoCommitWorkflows => 1, }
|
||||
);
|
||||
|
||||
my $trashed_event = $calendar->addChild(
|
||||
{ className => 'WebGUI::Asset::Event',
|
||||
startDate => $one_year_ago,
|
||||
endDate => $one_year_ago,
|
||||
}, undef, undef, {skipAutoCommitWorkflows => 1, }
|
||||
);
|
||||
$trashed_event->trash;
|
||||
|
||||
my $clipped_event = $calendar->addChild(
|
||||
{ className => 'WebGUI::Asset::Event',
|
||||
startDate => $one_year_ago,
|
||||
endDate => $one_year_ago,
|
||||
}, undef, undef, {skipAutoCommitWorkflows => 1, }
|
||||
);
|
||||
$clipped_event->cut;
|
||||
|
||||
$tag->commit;
|
||||
$calendar = $calendar->cloneFromDb;
|
||||
$event = $event->cloneFromDb;
|
||||
foreach my $asset($calendar, $event, $clipped_event, $trashed_event) {
|
||||
$asset = $asset->cloneFromDb;
|
||||
}
|
||||
|
||||
my $recurId = $event->setRecurrence(
|
||||
{ recurType => 'monthDay',
|
||||
|
|
@ -53,6 +70,22 @@ my $recurId = $event->setRecurrence(
|
|||
}
|
||||
);
|
||||
|
||||
$trashed_event->setRecurrence(
|
||||
{ recurType => 'monthDay',
|
||||
every => 2,
|
||||
startDate => $trashed_event->get('startDate'),
|
||||
dayNumber => $eventStartDate->day,
|
||||
}
|
||||
);
|
||||
|
||||
$clipped_event->setRecurrence(
|
||||
{ recurType => 'monthDay',
|
||||
every => 2,
|
||||
startDate => $clipped_event->get('startDate'),
|
||||
dayNumber => $eventStartDate->day,
|
||||
}
|
||||
);
|
||||
|
||||
my $workflow = WebGUI::Workflow->create(
|
||||
$session, {
|
||||
enabled => 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue