Behind-the-scenes preparation for moving collections to Elasticsearch

Description

Please note this issue is reserved for our contractors.

Groundwork for the user-facing aspects of collection tags.

  • The Filterable module should be included in the Collection model.

  • The unused fandoms and filters associations should be removed from the Collection model.

  • To reduce code duplication while enabling the use of brand new (i.e. unsorted) tags on collections, the Bookmark model's tag_string and tag_string= methods should be moved into the Taggable concern. The Bookmark model should then be updated to include Taggable, which will also be included in the Collection model via Filterable.

  • The number of tags that can be applied to a collection should initially be limited to 10, and the number should be configurable.

  • There should be a migration adding two boolean columns, which will not yet be exposed in the interface, to the collections table:

    • multifandom will allow a collection's owners to specify the collection is not meant to be fandom-specific (e.g. the /r/FanFiction Saddest Fanfic Recs collection). This will be necessary because the limit on the number of collection tags means they cannot tag every fandom featured in the collection.

    • open_doors will indicate a collection corresponds with an archive rescued by the OTW's Open Doors project.

Testing

  • Creating a collection should work normally

  • A collection's Fandoms page should work normally

  • Bookmark tags should work as normal, particularly creating a never-before-used tag

  • Migration should run successfully, up and down

Activity

Show:
Sarken
December 18, 2020, 4:01 PM
Edited

Migrated up, migrated down, and migrated back up successfully! The only issue was a known and unrelated thing wherein staging chokes on the mysqldump command.

The rest of this issue is now ready for testing.

redsummernight
December 25, 2020, 4:13 AM

Looks good.

Sarken
December 25, 2020, 3:00 PM
  • Created a collection and mass edited a bunch of existing works to add it to the collection.

  • Only the canonical fandoms appeared on the Fandoms page, as expected. The links led to the correct works listings.

  • New bookmark tag was successfully created and appeared in the unsorted bin as expected. Using an existing tag also worked fine.

Looks good to me!

DeployedToBeta

Assignee

Matt Sears

Reporter

Sarken

Roadmap

Bookmarks
Collections

Priority

Medium

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9