Install better error handling code into RequestApprovalForVersionTag. Do not generate leading commas in workflow instance scratch data.
This commit is contained in:
parent
503a378756
commit
55d55b4eee
3 changed files with 45 additions and 15 deletions
|
|
@ -12,6 +12,7 @@
|
|||
- fixed #11564: Shop: Cart does not require a state field in the address
|
||||
- fixed #11562: Missing perl modules in gotcha
|
||||
- fixed #11565: Can't clear cache on plainblack.com
|
||||
- fixed #11540: Pending version tags are not completed on approval under certain conditions
|
||||
|
||||
7.9.4
|
||||
- We're shipping underscore.js now for its suite of extremely handy utility
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ use Getopt::Long;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Workflow::Instance;
|
||||
|
||||
|
||||
my $toVersion = '7.9.5';
|
||||
|
|
@ -32,6 +33,7 @@ my $session = start(); # this line required
|
|||
|
||||
# upgrade functions go here
|
||||
modifySortItems( $session );
|
||||
fixRequestForApprovalScratch($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -44,6 +46,22 @@ finish($session); # this line required
|
|||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
sub fixRequestForApprovalScratch {
|
||||
my $session = shift;
|
||||
print "\tCorrect RequestApprovalForVersionTag workflow instance data with leading commas... " unless $quiet;
|
||||
# and here's our code
|
||||
my $instances = WebGUI::Workflow::Instance->getAllInstances($session);
|
||||
INSTANCE: foreach my $instance (@{ $instances }) {
|
||||
my $messageId = $instance->getScratch('messageId');
|
||||
next INSTANCE unless $messageId;
|
||||
$messageId =~ s/^,//;
|
||||
$instance->setScratch('messageId', $messageId);
|
||||
}
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Changes sortItems to a SelectBox
|
||||
sub modifySortItems {
|
||||
|
|
@ -56,7 +74,7 @@ sub modifySortItems {
|
|||
my $type = WebGUI::Form::SelectBox->getDatabaseFieldType;
|
||||
$session->db->write("ALTER TABLE SyndicatedContent MODIFY sortItems $type");
|
||||
|
||||
print "\t\tConverting old values...\n" unless $quiet;
|
||||
print "\t\tConverting old values..." unless $quiet;
|
||||
$session->db->write(q{
|
||||
UPDATE SyndicatedContent
|
||||
SET sortItems = 'none'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue