From f7962810db37b1a26ec9883805a60184c1363847 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 20 Jun 2008 08:57:04 +0000 Subject: [PATCH] corrected DataForm upgrade script --- docs/gotcha.txt | 9 +++++++++ docs/upgrades/upgrade_7.5.10-7.5.11.pl | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/gotcha.txt b/docs/gotcha.txt index c2fd90076..1ca08571a 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -17,6 +17,15 @@ save you many hours of grief. anyone with the right URL to see an RSS feed, even if they do not have permission to view the Collaboration System it came from. + * The 7.5.11 upgrade contained a bug that didn't import existing + Data Form entries properly. The script has been corrected, so if + you didn't already upgrade to 7.5.11, there is nothing to worry + about. If you already upgraded, the information can be restored + from a backup. See + http://www.webgui.org/bugs/tracker/data-form-listing-existing-entries-wrong-missing-data + for information on how to retrieve this information without having + to revert entirely to a past backup. + 7.5.11 -------------------------------------------------------------------- diff --git a/docs/upgrades/upgrade_7.5.10-7.5.11.pl b/docs/upgrades/upgrade_7.5.10-7.5.11.pl index a3f1840ef..dc409ad19 100644 --- a/docs/upgrades/upgrade_7.5.10-7.5.11.pl +++ b/docs/upgrades/upgrade_7.5.10-7.5.11.pl @@ -150,7 +150,7 @@ sub convertDataForm { my $newEntryFieldData = {}; my $entryFields = $session->db->read("SELECT * FROM `DataForm_entryData` WHERE assetId=? AND DataForm_entryId=?", [$assetId, $entryData->{DataForm_entryId}]); while (my $entryFieldData = $entryFields->hashRef) { - $newEntryFieldData->{ $fieldMapping{ $entryFieldData->{DataForm_fieldId} } } = $entryData->{value}; + $newEntryFieldData->{ $fieldMapping{ $entryFieldData->{DataForm_fieldId} } } = $entryFieldData->{value}; } $entryFields->finish; my $entryJSON = encode_json($newEntryFieldData);