SJRK-425: Stories without "published" flag are inaccessible

Metadata

Source
SJRK-425
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
N/A
Reporter
Gregor Moss
Created
2020-11-12T18:24:49.888-0500
Updated
2020-11-30T14:58:00.363-0500
Versions
  1. 0.4
Fixed Versions
  1. 0.4
Component
  1. Storytelling Tool Server

Description

After SJRK-289 was deployed to the server, all of the old stories ceased to be served because they're missing the "published" flag.

The work to solve this issue should be two steps:
1. Temporarily change the storiesById database view to allow both published stories AND those where the published flag is undefined, and make a similar change to the handleGetStory request handler
2. Update all of the old stories to have "published: true" in their data, then revert the step above to allow only published stories to be served publicly
3. Add tests to anticipate such issues as best as possible

As @@Justin Obara mentions in the comments, a better long-term solution would be version tracking for the records themselves and some migration tools.

Comments

  • Justin Obara commented 2020-11-13T09:36:43.796-0500

    I think for a longer term solution we may want to consider versioning the database records, and providing a tool/script for migrating between versions.

  • Cindy Li commented 2020-11-30T12:42:59.214-0500

    The pull request with the migration script has been merged into the project repo main branch at this commit.