Skip to content

Instantly share code, notes, and snippets.

@sjl
Created February 19, 2013 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjl/4986914 to your computer and use it in GitHub Desktop.
Save sjl/4986914 to your computer and use it in GitHub Desktop.

We use to stick into the SubtitleVersion.note strings such as "Rollback from version#" or "Uploaded" automatically. This was handy, because when looking at the review list, you could see that info. Helps debugging but also teams / users to grok what's going on.

However, it does have it's problems: no i18n / hard to customize messages, etc. For rollbacks,it's easy: since we already store the rollback_from_version_number, we can just check that and display that info.

I see the following alternatives: a) Stick it back into the SubtitleVersion.note field, with the issues raised above

b) Create a boolean ("from_upload") Keeps notes clean, easily 18n and customizable. However... (see bellow)

c) Create a "action_origin" choice field that can be "Editor", "Upload", "Api", "Imported from Third Party", "Scripted" This would allow us to better track the origin of a version without having to add booleans for each possible thing we want to track (say we have a mobile app in the future, it would accommodate it too) Disadvantages:

  • Another migration to run
  • Need to hook up the various calls to pipeline.add_version

Thoughts?

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