From a03e13ea4d5516507522fa69a996cf8bcbd192fb Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 10 May 2010 10:38:15 -0700 Subject: [PATCH] When a version tag is deleted, delete it's workflow instance, if it exists. Fixes bug #11544. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/VersionTag.pm | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 7fbb443d7..e6e86658f 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,6 +3,7 @@ - fixed #11557: Shop credit deduction calculated incorrectly - fixed #11561: PayDriver_Cash - password help - fixed #11541: running workflows screen + - fixed #11544: VersionTag Workflows with missing Version Tags run forever 7.9.4 - We're shipping underscore.js now for its suite of extremely handy utility diff --git a/lib/WebGUI/VersionTag.pm b/lib/WebGUI/VersionTag.pm index 917177795..0367f1bc2 100644 --- a/lib/WebGUI/VersionTag.pm +++ b/lib/WebGUI/VersionTag.pm @@ -640,6 +640,10 @@ sub rollback { $outputSub->(sprintf $i18n->get('Rolling back %s'), $revision->getTitle); $revision->purgeRevision; } + my $instance = $self->getWorkflowInstance; + if ($instance) { + $instance->delete; + } $session->db->write("delete from assetVersionTag where tagId=?", [$tagId]); $self->clearWorking; return 1;