Currently we have a "Freeze" button in DocBuilder that only adds the "Frozen" tag and then we have the "snapshot" csprocessor command. These two do entirely different things and should be standardised to do the same thing. Once that is done we could also add a freeze/snapshot button into the standard UI.
Fixed in 1.6-SNAPSHOT build 201405161207 Server: The rest server now has a few more endpoints to deal with freezing specs: POST /rest/1/contentspec/freeze/json/{id} POST /rest/1/contentspec/freeze/json+text/{id} POST /rest/1/contentspec/freeze/text/{id} GET /rest/1/contentspec/freeze/preview/text/{id} GET /rest/1/contentspec/freeze/preview/text/{id}/r/{rev} These endpoints also have the following query parameters: latestRevisions - boolean - If the all topics should be updated to their latest versions in the case where some topics are already frozen. createNewSpec - boolean - If the content spec should be frozen as a new content specification. maxRevision - Integer - The maximum revision to freeze topics to (see the snapshot --max-revision option). Note: There isn't a way to freeze a content spec from a revision and the preview endpoint is only there for the pull-snapshot CLI command. UI: The "Actions" menu in the UI now has a "Freeze" option. This will open up an extended LogMessage dialog with some additional freeze options. From the dialog there is also a "Preview" button which will allow the user to preview their freeze before actually performing it. I've also added a way to open a spec with the freeze dialog open from a URL. The format is: #ContentSpecFilteredResultsAndContentSpecView;id=<ID>;action=freeze; (I've also setup "translationPush" and "translationSync" for the possible actions) CLI: The pull-snapshot and snapshot commands have been updated to use the new REST API endpoints instead of doing the snapshots on the users machine. DocBuilder: The DocBuilder index page has been updated so that when the spec isn't frozen there will be a button that will open a new tab to the UI freeze dialog. If the book is already frozen, then it will just show "Frozen" as text.
The following tested ok: * freezing an invalid spec, which displayed the appropriate error * freezing a spec with no frozen topics * freezing a spec with a mix of unfrozen and frozen topics * create new specs or updating the existing one * previewing
The following in various combinations with csprocessor snapshot * --new * --latest * --max-topic-revision All worked as expected.
The freeze UI doesn't provide the ability to set the max revision.
Ignore the comments about the "ERROR: No data was found for the specified ID!" message. I didn't copy the spec id properly.
Tested snapshot and pull-snapshot ok. Tested max revision from UI ok. Confirmed that the ContentSpecFilteredResultsAndContentSpecView;id=<ID>;action=freeze; url opens the spec with the freeze dialog open.
Fixed in 1.6-SNAPSHOT build 201405231021 Added a "Max Topic Revision" field that will only accept numbers. Note: This version has been deployed to the test/development server.
Fixed in 1.6-SNAPSHOT build 201405231055 The action dialogs weren't being closed during the close() method.
Verified