Template the emails sent out during content approval. Includes new template, i18n, Help docs upgrade sub and code. Fixes bug #11901.

This commit is contained in:
Colin Kuskie 2010-10-18 13:53:33 -07:00
parent 19a87ea003
commit 3ad69de404
7 changed files with 119 additions and 16 deletions

View file

@ -9,6 +9,7 @@
- fixed #11898: String eval used in Image::Graph
- fixed #11913: Editing the survey doesn't work
- fixed #11915: Date macro returns hour value w/ leading space
- fixed #11901: NotifyAboutVersionTag includes URL, even when inappropriate
7.10.2
- fixed #11884: Editing Templates impossible / Code editor not loaded

View file

@ -32,6 +32,7 @@ my $session = start(); # this line required
# upgrade functions go here
pruneInboxMessagesFromDeletedUsers($session);
addTemplateToNotifyAboutVersionTag($session);
finish($session); # this line required
@ -61,6 +62,27 @@ EOSQL
}
#----------------------------------------------------------------------------
# Describe what our function does
sub addTemplateToNotifyAboutVersionTag {
my $session = shift;
print "\tAdd template to Notify About Version Tag workflow activities." unless $quiet;
use WebGUI::Workflow::Activity;
use WebGUI::Workflow::Activity::NotifyAboutVersionTag;
my $templateId = WebGUI::Workflow::Activity::NotifyAboutVersionTag->definition($session)->[0]->{properties}->{templateId}->{defaultValue};
my $activityList = $session->db->read(q|select activityId from WorkflowActivity|);
while (my ($activityId) = $activityList->array) {
my $activity = WebGUI::Workflow::Activity->new($session, $activityId);
next unless $activity;
next unless $activity->isa('WebGUI::Workflow::Activity::NotifyAboutVersionTag')
|| $activity->isa('WebGUI::Workflow::Activity::RequestApprovalForVersionTag')
;
$activity->set('templateId', $templateId);
}
print "...DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
#----------------------------------------------------------------------------