silverstripe-australia/advancedworkflow — pull request #154 by tractorcow (2014-04-07 05:28:38+00:00)
Title: BUG Ability to add comments to first step in workflow

Fixes additional bug of finished steps not having Finished = true assigned

The basis of this PR came because notes and other action fields were not available on the first action, at which time there is no `WorkflowInstance` for the current object.

This fix refactors the responsibility for generating and presenting fields from the `WorkflowActionInstance` to the `WorkflowAction`. Individual subclasses of `WorkflowActionInstance` and `WorkflowAction` should still be able to override these as necessary. This is necessary because sometimes we need these fields prior to the start of a new workflow.

The behaviour of AdvancedWorkflowExtension when creating and advancing workflows has been consolidated into a single `processWorkflow` method that will work equally well on new or updated records.

Because the behaviour of this update affects CMS usability, I think it's pretty critical that we get some behat tests going. Once @LukePercy has made some progress at https://github.com/silverstripe-australia/advancedworkflow/pull/136. Once this is integrated I will come back to this PR and add the appropriate tests. :)

Does someone mind to please manually check and test this to make sure nothing obvious has been broken?