Fixed two new Survey bugs
* Survey response startDate stored twice startDate was being stored both in a column in Survey_response and also inside the serialised responseJSON. Consolidated to column and moved startDate methods to Survey.pm where they are actually used. Was not causing errors because both copies were initialised to "now" at response creation time, and then never changed (this is also why we don't need any repair code to fix existing survey repsonses in the wild). * Survey ExpireIncompleteSurveyResponses Workflow Activity not enabled The only time you'd actually want to modify startDate is when you're trying to simulate response expiry in test code, which is why I found the above bug when I was writing the missing test suite for ExpireIncompleteSurveyResponses. Along with test suite, added upgrade code to enable workflow activity and add it to the Daily Maintenance Tasks workflow. Also made minor fixes to the workflow activity, such as making sure it uses the correct isComplete code.
This commit is contained in:
parent
0bfc16bf9a
commit
146373937d
9 changed files with 236 additions and 102 deletions
|
|
@ -29,6 +29,8 @@
|
|||
- fixed #10029: Account CSS rule scoping
|
||||
- fixed #10641: Matrix Asset - Compare/Search buttons broken in Opera
|
||||
- fixed #10723: RSS Feed Error in Gallery
|
||||
- fixed Survey response startDate stored twice (Patrick Donelan, SDH Consulting)
|
||||
- fixed Survey ExpireIncompleteSurveyResponses Workflow Activity not enabled (Patrick Donelan, SDH Consulting)
|
||||
|
||||
7.7.16
|
||||
- fixed #10590: Session::DateTime->secondsToInterval doesn't allow 7 weeks
|
||||
|
|
@ -57,7 +59,7 @@
|
|||
- fixed #10685: i18n Asset_StoryTopic::rssUrl
|
||||
- fixed #10686: Can't access Database Links
|
||||
- fixed #10650: Unflatten WebGUI storage locations
|
||||
- fixed #10664: ThiingyRecord disappeared... sort of
|
||||
- fixed #10664: ThingyRecord disappeared... sort of
|
||||
- fixed #10687: i18n Asset_Product::buy_form_options
|
||||
- fixed #10651: Dashboard Content positions
|
||||
- fixed #10695: Adding a new article creates a new version tag
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ my $session = start(); # this line required
|
|||
addFriendManagerSettings($session);
|
||||
fixGalleyImageFolderStyle($session);
|
||||
fixMapTemplateFolderStyle($session);
|
||||
addExpireIncompleteSurveyResponsesWorkflow($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -86,6 +87,25 @@ sub fixGalleyImageFolderStyle {
|
|||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub addExpireIncompleteSurveyResponsesWorkflow {
|
||||
my $session = shift;
|
||||
|
||||
print "\tAdd ExpireIncompleteSurveyResponses workflow activity... " unless $quiet;
|
||||
|
||||
my $none = $session->config->get('workflowActivities/None');
|
||||
if (! grep { $_ eq 'WebGUI::Workflow::Activity::ExpireIncompleteSurveyResponses' } @$none) {
|
||||
push @$none, 'WebGUI::Workflow::Activity::ExpireIncompleteSurveyResponses';
|
||||
}
|
||||
$session->config->set('workflowActivities/None', [@$none]);
|
||||
|
||||
my $workflow = WebGUI::Workflow->new($session, 'pbworkflow000000000001');
|
||||
my $activity = $workflow->addActivity('WebGUI::Workflow::Activity::ExpireIncompleteSurveyResponses');
|
||||
$activity->set('title', 'Expire Incomplete Survey Responses');
|
||||
$activity->set('description', 'Expires incomplete Survey Responses according to per-instance Survey settings');
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue