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:
Patrick Donelan 2009-08-07 01:08:39 +00:00
parent 0bfc16bf9a
commit 146373937d
9 changed files with 236 additions and 102 deletions

View file

@ -3,7 +3,7 @@ use strict;
our $I18N = {
'name' => {
message => q|ExpireIncompleteSurveyResponses|,
message => q|Expire Incomplete Survey Responses|,
lastUpdated => 0,
},
'Delete expired survey responses' => {
@ -12,7 +12,7 @@ our $I18N = {
lastUpdated => 0,
},
'delete expired' => {
message => q|When ran, every survey response which is expired will be completely removed from the database.|,
message => q|When run, every survey response which is expired will be completely removed from the database.|,
context => q|the hover help for the delete responses field|,
lastUpdated => 0,
},