diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 81dd6014a..02e82cc98 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -5,6 +5,7 @@ - fixed #12269: Login / Loginbox with encryptlogin - fixed #12271: Calendar List View does not always show labels - fixed Passive Analytics, UI, Progress Bar, server load. + - fixed #12303: Survey custom multiple choice question types 7.10.23 - fixed #12225: Stock asset, multiple instances on a page diff --git a/docs/upgrades/upgrade_7.10.23-7.10.24.pl b/docs/upgrades/upgrade_7.10.23-7.10.24.pl index f0f3db9c2..021db97f9 100644 --- a/docs/upgrades/upgrade_7.10.23-7.10.24.pl +++ b/docs/upgrades/upgrade_7.10.23-7.10.24.pl @@ -34,6 +34,7 @@ my $session = start(); # this line required addPALastLogTable($session); addForkRedirect($session); extendBucketName($session); +fixSurveyQuestionTypes($session); finish($session); # this line required @@ -81,6 +82,19 @@ EOSQL print "DONE!\n" unless $quiet; } + +#---------------------------------------------------------------------------- +# Describe what our function does +sub fixSurveyQuestionTypes { + my $session = shift; + print "\tFix bad custom Question Types in the Survey... " unless $quiet; + # and here's our code + $session->db->write(<question($address); - my $ansString = $question->{answers} ? to_json $question->{answers} : {}; + my $ansString = $question->{answers} ? to_json $question->{answers} : '{}'; $self->session->db->write("INSERT INTO Survey_questionTypes VALUES(?,?) ON DUPLICATE KEY UPDATE answers = ?",[$questionType,$ansString,$ansString]); $question->{questionType} = $questionType; }