Bug 1092188
| Summary: | Standardise the freeze/snapshot functionality | ||
|---|---|---|---|
| Product: | [Community] PressGang CCMS | Reporter: | Lee Newson <lnewson> |
| Component: | CCMS-Core | Assignee: | Lee Newson <lnewson> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.4 | CC: | mcaspers |
| Target Milestone: | --- | ||
| Target Release: | 1.6 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-05-28 21:56:18 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Lee Newson
2014-04-28 23:23:44 UTC
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 |