Skip to content

Create a method of populating or managing the editions table #382

Closed

Description

@waldoj

When adding new versions of editions, or managing a just-imported edition, we need to provide a mechanism for setting the names of those editions, as will appear in URL slugs and navigation elements. Of course, this must be compatible with #362 ("Establish a method of viewing old versions of a law").

We'll need to limit the labels for editions to URL-viable descriptors. I suggest all lowercase, no spaces. By allowing something other than years, we're going to have to start URL encoding it when output within a URL.

Activity

  1. krusynth commented on Sep 9, 2013

    @krusynth
    Member

    So, do we expect editions to always be a year? Or should we change that into an open-text entry of some sort? It seems to me we want to have an edition name and edition slug ? And then we can allow the user to enter their own at the time of import - choose an existing edition to overwrite, or create a new one.

  2. waldoj commented on Sep 9, 2013

    @waldoj
    MemberAuthor

    So, do we expect editions to always be a year?

    Definitely not, as per #355 ("Rename EDITION_YEAR constant"). I've been thinking a name/slug approach would be a good one.

  3. ghost assigned on Sep 9, 2013
  4. krusynth commented on Sep 10, 2013

    @krusynth
    Member

    I'm just going to comment here, though this affects all of #355 #362 #382

    I've added a few new tricks to the admin panel, so a user can choose to insert a new edition or update an old one, just by importing data. There probably needs to be a whole new view to handle edition management, but that would be a next step here. #402

    One thing I've done here is allow the user to enter their own name and slug for new editions - though we should probably generate that slug the same way that Wordpress does (and using javascript). #401

    This also creates the proper permalinks to the edition in question. The next step would be to modify the permalinks table to allow many permalinks to a single resource, and have a "preferred" url flag that is used to show the best link available. #400

    We're not checking to see if there's a duplicate edition slug. #399

    This probably will have a few issues generated from it, but I'll be happy to take a look at those moving forward. 🚫 🎤 ⬇️

  5. waldoj commented on Sep 10, 2013

    @waldoj
    MemberAuthor

    Dude. You've made the most of today. :) I look forward to trying this out in the morning!

  6. krusynth commented on Sep 10, 2013

    @krusynth
    Member

    Everyone - you'll probably want to blow away your database and start from scratch, as there are new versions of the editions, laws, and structure tables. (And shouldn't we rename that to structures for consistency?)

  7. jathayde commented on Sep 10, 2013

    @jathayde
    Member

    Cool. the state decoded.sql file in admin still the authoritative schema?

  8. krusynth commented on Sep 10, 2013

    @krusynth
    Member
  9. added a commit that references this issue on Sep 13, 2013
  10. krusynth commented on Apr 25, 2015

    @krusynth
    Member

    This is now complete on the edition-update branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions