From 68da3427c5008d3da426461a0c3fa4a2c262e88a Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 30 Aug 2011 15:11:12 -0700 Subject: [PATCH] Don't commit an empty version tag when extending calender recurrences. Fixes bug #12240. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index f1122a081..2d0455b26 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -5,6 +5,7 @@ - fixed #12227: Corrected AssetReport such that OrderBy works correctly. - fixed #12238: Old template attachement in search template slows down sites - fixed #12239: Still get cart error message after removing extra recurring items from the cart + - fixed #12240: Empty Extend Calendar Recurrance version tags 7.10.22 - rfe #12223: Add date type to content profiling (metadata) diff --git a/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm b/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm index d5e35ff15..07c8db5a1 100644 --- a/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm +++ b/lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm @@ -194,7 +194,13 @@ sub processRecurrence { $event->generateRecurrence($d); } - $versionTag->commit; + ##If nothing needed to happen, then don't keep the tag around. + if ($versionTag->getAssetCount > 0) { + $versionTag->commit; + } + else { + $versionTag->rollback; + } return $time_limit ? 1 : 0; } ## end sub processRecurrence