guardian/frontend — pull request #4718 by stephanfowler (2014-06-16 17:24:54+00:00)
Title: Collections: use persistent IDs

In collections, reference articles by their `internalContentCode` instead of by their url path (ie. instead of `id`). This means we can reference draft content from the CAPI preview stack, as drafts have no URL. It also means we won't lose content from fronts when URLs are modified.

Eg. use `internal-code/content/435616576` instead of `uk-news/2014/apr/29/woman-rescued-wells-cathedral-tower`.

Existing collections need to be transformed once this is deployed. This means switching off the tool while we download all the collections, transform them, then upload then again. There's a util for doing this local transformation: https://github.com/guardian/skeleton/blob/master/util/map-ids/app.js

IMPORTANT: collections are pushed to CAPI (for the benefit of apps), and within these collections any articles referenced by their `internalContentCode` are served out by CAPI with this as their `id` value. To be confirmed that this is correct behaviour, and/or acceptable to apps.