alphagov/whitehall — pull request #1155 by jamiecobbett (2013-12-11 16:23:07+00:00)
Title: Newer mappings export

Whitehall captures lots of juicy Old URLs associated with documents and therefore with the New URLs. This can provide a lot of the mappings for a site being transitioned and afterwards.

Whitehall already exports a mappings CSV for redirector. There are several things about that file which don't fit with what we want to do in the Transition app.

These include:
* including rows for every edition of a document, not just the current one
* including rows for documents without DocumentSources
* archived editions get a state of "draft"
* Whitehall shouldn't decide the HTTP status code to be used

The existing export is left almost as-is so that the Redirector munge process can still consume it. When Redirector (or at least the munge) goes away, that code can be deleted.

For the cron job, I've picked times that are an hour later than the existing export to let it finish.