diff --git a/TODO.txt b/TODO.txt index 5c781747..ee977576 100644 --- a/TODO.txt +++ b/TODO.txt @@ -162,6 +162,10 @@ M When import story form, hundreds of triples can be generated which take minute ==== DONE +--- Release 1.5.15 + +Changed: Dealt more gracefully with situation in which multi-choice question (checkboxes) was changed to single-choice question (select) after data was collected. Was choking on wrong data type during story export. + --- Release 1.5.14 Fixed: Bug in printing story cards where story-form question-answers were not appearing. diff --git a/package.json b/package.json index 33dc6840..5090dfd3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "NarraFirma", "description": "NarraFirma webapp for Participatory Narrative Inquiry (PNI)", - "version": "1.5.14", + "version": "1.5.15", "keywords": [ "JavaScript", "NarraFirma", diff --git a/webapp/source/csvImportExport.ts b/webapp/source/csvImportExport.ts index d620a75c..973864c0 100644 --- a/webapp/source/csvImportExport.ts +++ b/webapp/source/csvImportExport.ts @@ -2492,7 +2492,23 @@ export function exportStoryCollection() { outputLine.push(value[option] ? option : ""); }); } else { - outputLine.push(value); + // deal with pathological case where object data exists for select question (it should not) + // this could happen if user changed checkboxes question to select question after adding data + // there should be only one true value in the dictionary, so find it, then output that key + if (question.displayType === "select" && typeof value === "object") { + const keys = Object.keys(value); + for (let keyIndex = 0; keyIndex < keys.length; keyIndex++) { + const thisKey = keys[keyIndex]; + const thisValue = value[thisKey]; + if (thisValue) { + outputLine.push(thisKey); + console.log("WARNING: Found multi-choice answer for single-choice question. Writing first answer marked true.", value, question); + break; + } + } + } else { + outputLine.push(value); + } } if (question.writeInTextBoxLabel) { const writeInValue = story.fieldValueWriteIn(question.id); diff --git a/webapp/source/versions.ts b/webapp/source/versions.ts index 9bb9a41c..e2e3d9aa 100644 --- a/webapp/source/versions.ts +++ b/webapp/source/versions.ts @@ -3,7 +3,7 @@ import kludgeForUseStrict = require("./kludgeForUseStrict"); // Return current versions used by application const versions = { - narrafirmaApplication: "1.5.14", + narrafirmaApplication: "1.5.15", questionnaireContentType: "org.workingwithstories.NarraFirmaQuestionnaire", questionnaireContentVersion: "0.2.0", diff --git a/wordpress-plugin/narrafirma/narrafirma.php b/wordpress-plugin/narrafirma/narrafirma.php index ef487d6b..dab443f3 100644 --- a/wordpress-plugin/narrafirma/narrafirma.php +++ b/wordpress-plugin/narrafirma/narrafirma.php @@ -4,7 +4,7 @@ Plugin URI: http://narrafirma.com Description: Participatory Narrative Inquiry in a box. Gather stories and make sense of challenges and opportunities in your community or organization. Author: Cynthia F. Kurtz and Paul D. Fernhout -Version: 1.5.14 +Version: 1.5.15 Author URI: http://cfkurtz.com License: GPLv2 or later */ @@ -29,7 +29,7 @@ defined( 'ABSPATH' ) or die( 'Plugin must be run from inside WordPress' ); -$NARRAFIRMA_VERSION = '1.5.14'; +$NARRAFIRMA_VERSION = '1.5.15'; $pointrelServerVersion = "pointrel20150417-0.0.4-wp"; diff --git a/wordpress-plugin/narrafirma/readme.txt b/wordpress-plugin/narrafirma/readme.txt index d44dcb92..5cbf3398 100644 --- a/wordpress-plugin/narrafirma/readme.txt +++ b/wordpress-plugin/narrafirma/readme.txt @@ -9,7 +9,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i Requires at least: 4.3.1 Tested up to: 5.9.1 Stable tag: trunk -Version: 1.5.14 +Version: 1.5.15 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -106,6 +106,10 @@ We strongly suggest that you set up any web site on which you intend to install == Changelog == += 1.5.15 = + +Changed: Dealt more gracefully with situation in which multi-choice question (checkboxes) was changed to single-choice question (select) after data was collected. Was choking on wrong data type during story export. + = 1.5.14 = Fixed: Bug in printing story cards where story-form question-answers were not appearing. @@ -575,6 +579,9 @@ change logs, see the [GitHub repository](https://github.com/pdfernhout/narrafirm == Upgrade Notice == += 1.5.15 = +This minor upgrade deals more gracefully with a situation in which a multi-choice question (checkboxes) was changed to a single-choice question (select) after data was collected. + = 1.5.14 = This minor upgrade fixes a bug in printing story cards where story-form question-answers were not appearing.