- fix: undefined activity
This commit is contained in:
parent
81fd7c6194
commit
155ca81291
3 changed files with 27 additions and 8 deletions
|
|
@ -3,6 +3,7 @@
|
|||
- Config file bugs fixed, see gotcha.txt for details.
|
||||
- Added export to context menu in asset manager
|
||||
- fix: XHTML 1.0 strict, FileUploadControl.js, resizable textarea
|
||||
- fix: undefined activity
|
||||
- Polls now use JSON instead of Storable to serialize graph config
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@ use lib "../../lib";
|
|||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
|
||||
use WebGUI::Workflow::Cron;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Utility;
|
||||
|
||||
my $toVersion = "7.4.3"; # make this match what version you're going to
|
||||
my $quiet; # this line required
|
||||
|
|
@ -22,16 +24,32 @@ my $session = start(); # this line required
|
|||
|
||||
# upgrade functions go here
|
||||
reserializePollGraphConfigs($session);
|
||||
fixCsMailWorkflow($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
##-------------------------------------------------
|
||||
#sub exampleFunction {
|
||||
# my $session = shift;
|
||||
# print "\tWe're doing some stuff here that you should know about.\n" unless ($quiet);
|
||||
# # and here's our code
|
||||
#}
|
||||
#-------------------------------------------------
|
||||
sub fixCsMailWorkflow {
|
||||
my $session = shift;
|
||||
print "\tFixing CS Mail workflows and crons.\n" unless ($quiet);
|
||||
# get valid crons
|
||||
my $collaborations = $session->db->read("select assetId from asset where className like 'WebGUI::Asset::Wobject::Collaboration%'");
|
||||
my @cronIds = ();
|
||||
while (my ($id) = $collaborations->array) {
|
||||
my $cs = WebGUI::Asset->newByDynamicClass($session, $id);
|
||||
if (defined $cs) {
|
||||
push(@cronIds, $cs->get("getMailCronId"));
|
||||
}
|
||||
}
|
||||
# delete invalid crons
|
||||
for my $task (@{WebGUI::Workflow::Cron->getAllTasks($session)}) {
|
||||
next unless ($task->get("className") =~ m/WebGUI::Asset::Wobject::Collaboration/);
|
||||
unless (isIn($task->getId, @cronIds)) {
|
||||
$task->delete;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub reserializePollGraphConfigs {
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ sub commit {
|
|||
$cron = WebGUI::Workflow::Cron->create($self->session, {
|
||||
title=>$self->getTitle." ".$i18n->get("mail"),
|
||||
minuteOfHour=>"*/".($self->get("getMailInterval")/60),
|
||||
className=>"WebGUI::Asset::Wobject::Collaboration",
|
||||
className=>(ref $self),
|
||||
methodName=>"new",
|
||||
parameters=>$self->getId,
|
||||
workflowId=>"csworkflow000000000001"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue