alphagov/whitehall — pull request #41 by heathd (2012-09-26 16:33:38+00:00)
Title: Scheduled publishing

Key changes:

* addition of scheduled_publication datetime to Edition
* workflow and user interface allowing:
* Normal scheduling: draft -> submitted -> scheduled -> published
* Forced scheduling: draft -> scheduled -> published
* Unscheduling: scheduled -> submitted
* Retrospective approval after forced scheduling
* logic around publishing/scheduling permissions

Some things I'm not sure about:

* I made a test 'macro' should_allow_scheduled_publication_of which I invoke in all controller tests. This follows the established patterns in our existing functional tests. However, given our concern about test performance, I'm not sure if this is a good idea, since the underlying code which handles this is identical for all controllers.
* I opted to use SERIALIZABLE transaction isolation level when publishing batches. I explained my rationale for this in the commit message. It maybe introduces a little complexity but I think it's worthwhile for the improved correctness.