From 1f7b8a5b26102f82978e705a1f3b582e817e9b61 Mon Sep 17 00:00:00 2001 From: Cynthia Kurtz Date: Fri, 4 Mar 2022 20:15:35 -0500 Subject: [PATCH] Fixed bug where "questionnaire" was stupidly renamed to "storyForm" in a place that caused the data not to be picked up when printing story cards. Ready to release as v1.5.14. --- TODO.txt | 4 ++++ package.json | 2 +- webapp/source/surveyBuilderMithril.ts | 2 +- webapp/source/surveyCollection.ts | 12 +++++++++++- webapp/source/versions.ts | 2 +- wordpress-plugin/narrafirma/narrafirma.php | 4 ++-- wordpress-plugin/narrafirma/readme.txt | 9 ++++++++- 7 files changed, 28 insertions(+), 7 deletions(-) diff --git a/TODO.txt b/TODO.txt index 9807cf5a..5c781747 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.14 + +Fixed: Bug in printing story cards where story-form question-answers were not appearing. + --- Release 1.5.13 Fixed: Bug where choose-questions-for-story-form widget was not matching up questions correctly if question short names had extra (leading or trailing) blank spaces. (Now any extra blank spaces are trimmed off.) diff --git a/package.json b/package.json index 052de163..33dc6840 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "NarraFirma", "description": "NarraFirma webapp for Participatory Narrative Inquiry (PNI)", - "version": "1.5.13", + "version": "1.5.14", "keywords": [ "JavaScript", "NarraFirma", diff --git a/webapp/source/surveyBuilderMithril.ts b/webapp/source/surveyBuilderMithril.ts index af010fa3..fc1a1e40 100644 --- a/webapp/source/surveyBuilderMithril.ts +++ b/webapp/source/surveyBuilderMithril.ts @@ -614,7 +614,7 @@ export function buildSurveyForm(surveyDiv, storyForm, doneCallback, surveyOption const surveyResult = { __type: "org.workingwithstories.storyFormResponse", // TODO: Think about whether to include entire storyForm or something else perhaps - storyForm: storyForm, + questionnaire: storyForm, responseID: generateRandomUuid("storyFormResponse"), stories: [], language: currentLanguage, diff --git a/webapp/source/surveyCollection.ts b/webapp/source/surveyCollection.ts index 6b5d9fc1..506375d2 100644 --- a/webapp/source/surveyCollection.ts +++ b/webapp/source/surveyCollection.ts @@ -207,7 +207,17 @@ export function getStoriesForStoryCollection(storyCollectionIdentifier, includeI } // Add some fields for displaying information - story.questionnaire = surveyResult.questionnaire; + // note: we must check both field names (questionnaire and storyForm) + // because I stupidly changed "questionnaire" to "storyForm" + // without realizing I was messing up references in the data; + // I put it back later, but either name could be in legacy data + if (surveyResult.questionnaire) { + story.questionnaire = surveyResult.questionnaire; + } else if (surveyResult.storyForm) { + story.questionnaire = surveyResult.storyForm; + } else { + console.log("ERROR: story has no story form reference.") + } story.indexInStoryCollection = ++numStoriesAddedForCollection; story.storyCollectionIdentifier = storyCollectionIdentifier; const wrappedStory = new Story(story); diff --git a/webapp/source/versions.ts b/webapp/source/versions.ts index 86d4115b..9bb9a41c 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.13", + narrafirmaApplication: "1.5.14", questionnaireContentType: "org.workingwithstories.NarraFirmaQuestionnaire", questionnaireContentVersion: "0.2.0", diff --git a/wordpress-plugin/narrafirma/narrafirma.php b/wordpress-plugin/narrafirma/narrafirma.php index 8e800b86..ef487d6b 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.13 +Version: 1.5.14 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.13'; +$NARRAFIRMA_VERSION = '1.5.14'; $pointrelServerVersion = "pointrel20150417-0.0.4-wp"; diff --git a/wordpress-plugin/narrafirma/readme.txt b/wordpress-plugin/narrafirma/readme.txt index 89324bcb..d44dcb92 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.13 +Version: 1.5.14 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.14 = + +Fixed: Bug in printing story cards where story-form question-answers were not appearing. + = 1.5.13 = Fixed: Bug where choose-questions-for-story-form widget was not matching up questions correctly if question short names had extra (leading or trailing) blank spaces. (Now any extra blank spaces are trimmed off.) @@ -571,6 +575,9 @@ change logs, see the [GitHub repository](https://github.com/pdfernhout/narrafirm == Upgrade Notice == += 1.5.14 = +This minor upgrade fixes a bug in printing story cards where story-form question-answers were not appearing. + = 1.5.13 = This minor upgrade fixes two tiny bugs you might have run into if you had extra (blank) leading or trailing spaces in your question short names, or if you had extra (empty) lines in your available-answers lists. NF now deals more elegantly with both situations.