HomePhabricator

Make sure flow entries are created with correct content

Description

Make sure flow entries are created with correct content

BoardContent objects will store a string of json that includes
the workflow id. However, when creating the board, the workflow
has not yet been stored (and the workflow can't be stored until
the page has been stored)
SubmissionHandler used to initialize BoardContent with null if
the workflow was new, which led to revision with invalid content
(the workflow id was not in there) so it wasn't possible to,
for example, delete the page.

Let's just create the board with the workflow id of the board
we're about to commit a couple of lines later. In the unlikely
event that goes wrong (validation has already occured at this
point), we can remove the page again, thus ensuring a page
can't exist without a workfow and vice versa.

Bug: T109768
Change-Id: I67e547c17b3b4660425e98f46a8e6292957666e1

Details

Provenance
matthiasmullieAuthored on
Parents
rEFLW174b6873a2b4: Fix some PHPDoc
Branches
Unknown
Tags
Unknown
References
refs/changes/15/234515/1
ChangeId
I67e547c17b3b4660425e98f46a8e6292957666e1