Align BCMS Book Versions with PMC Book architecture to avoid potential data integrity issues
Context
Book Versions User Story: The current Silverlight CMS supports book versions of unlimited numbers in the hundreds of version packages of book files (frequently for chapter-processed books more than 500) under any free-text book version name that the user can navigate to for review, or reversion, or to update and add to the PMC Books database. The BCMS must also support book versions to keep distinct both book version content types, book version numbers, and the status of those book versions and their associated book files in a way that is clearly and stably mapped to current and future PMC Book database and processing architecture. See user stories and acceptance criteria at: &47
Book Version Issues that need to be solved for the MVP: Coko implemented book versions so that each book version, whether it is a wholebook or chapter-processed book, is a new book in the database linked to one shared domain with a unique BCMS ID with a shared common BCMS ID prefix followed by its version number (e.g., BCMSID222.1). This, however, means it is very easy for a user to create a new book version inaccurately that cannot be edited or deleted to prevent data integrity issue. It also means that each book version appears on all dashboards, including collection dashboards, and that each version is linked to a collection attribute. Lastly, it does not meet the original NCBI requirements for book versions that conforms to the PMC Book architecture that does not permit now or in the future a content version at both the book AND chapter component level.
Impact if this issue is not solved: If Coko cannot resolve these issues then it will likely result in future data model issues and in data integrity issues not only in the tracking and storage of book versions in the BCMS, but in failed NCBI processes that depend on a stable data model, file management, and processing rules.
Acceptance Criteria
-
User cannot create book versions for chapter-processed books, unless they are BCMS-only book versions to change processing / workflow settings, and lock previous book versions - estimate and proposal for that in italics is delineated in #783 (closed) which will likely need to be delayed to post-MVP, but an estimate can be provided separately -
User should only be able to create book versions when permitted given workflow, processing, and other role permissions (in the cases desirable in NCBI's technical proposal below).
Acceptance Criteria
-
Remove content type and version number at the book level for chapter-processed books -
Only show Content type
and book version number when an Organization has a setting that permits book versions -
If Organization permits book versions, only show 'Content type' when 'Submission type' = 'Complete books and documents' and 'Conversion workflow' = PDF or XML -
If Organization permits book versions, when 'Submission type' = 'Complete books and documents' and 'Conversion workflow' = XML, make 'Content type' automatically = 'Final full-text', and that default Content type in this case shouldn't be editable except by System Admin. -
If Organization permits book versions, when 'Submission type' = 'Complete books and documents' and 'Conversion workflow' = PDF, make the following 'Content type' options available, in this order: 'Author manuscript', 'Prepublication draft', 'Published PDF', 'Final full-text'. -
If Organization permits book versions, only show version number input when 'Submission type' = 'Complete books and documents' and 'Conversion workflow' ≠ Word ('Conversion workflow' = PDF or XML). -
Changes required to JSON sent for chapters: do not send a content type ( version-name
) for chapter processed books in the chapters' JSON.
Design proposal
Update to wholebook organization book template
The concept of "If Organization permits book versions..." would be best handled as an update to the existing book settings templates. This is consistent with how multiple published chapter versions are set at the orgnization level.
Chapter-processed books existing template
Note the text change to add "chapter"
Wholebooks existing template
Note addition of "Support multiple published book versions"
This toggle can be sensitive for all users with appropriate permissions, or we can limit editing rights to System Admins. NCBI should confirm.
Update to New Book and Book Settings UIs
To remove the ability to add a content type
and version number
at the book level of chapter-processed books, the form logic of the new book step can change:
New book Step 1: remove content type and version number
New book Step 2: after "wholebook" and "PDF" or "XML" are chosen in step 1, allow user to set content type and version number
When "XML" is selected 'Final full-text' is the default content type, editable by System Admins only.
When "PDF" is selected, all options are available in the following order
Book settings
- Add the new setting "Support multiple published book versions" to PDF and XML wholebooks.
- Editing Content type and Version number is not possible -- see #1340 (comment 109468)
Caveats
- Book Versioning in the data model remains unchanged. A chapter-processed book can be versioned in the future to meet the use cases described in #783 (closed)
- No change is made to BCMS IDs: When the first book version is created, it has the BCMS base value + 1. For example:
bcms1234.1
- Since wholebooks and chapter-processed books are not differentiated in the data model, and
content type
was chosen as a value to define book versions in the original scope, this attribute will exisit for chapter-processed book but the value will benull
.