Read OA status from converted file and add to PDF and XML wholebook metadata
Requested behaviour
PDF and XML wholebook metadata should show the following fields: Copyright Statement, Open Access License, Creative Commons License Type, and License statement, read from the converted file.
When a user uploads a converted file or when a converted file is received, these values are updated in the Metadata UI and are read only. The Open Access status is not kept in sync with the Open Access status in Settings. As per the BITS specifications, if we receive a converted XML file with license-type="open-access"
in the <license>
section, we will display the toggle as on. In all other cases (where we don't receive that value at all, or receive a different value) we will leave the toggle off.
...
<book-meta>
<book-id>...</book-id>
...
<pub-history>...</pub-history>
<permissions>
<copyright-statement>Copyright: © 2004 Eichenberger
et al.</copyright-statement>
<copyright-year>2004</copyright-year>
<license license-type="open-access"
xlink:href="http://creativecommons.org/licenses/by/2.0/">
<license-p>This is an open-access article distributed under the
terms of the Creative Commons Attribution License, which permits
unrestricted use, distribution, and reproduction in any medium,
provided the original work is properly cited.</license-p>
</license>
</permissions>
<abstract>...</abstract>
</book-meta>
...
Current behaviour
This field is not in the PDF and XML whole book metadata templates.
Steps to reproduce
- Open a PDF whole book
- Open the metadata template for that book by clicking the metadata button in the upper right hand corner
- Scroll down to look for the listed fields
- The fields are not present
- Repeat for XML whole books
Environment
PC - Edge
Possible solution
- Ignore any entities (
<!ENTITY...>
) before the top-level element as confirmed here: #933 (comment 95606) - Read these values from converted XML for PDF and XML wholebooks.
- Display read only values in Metadata UI for PDF and XML wholebooks.
QA Steps
- Create a PDF or XML whole book
- Upload the converted file or submit the book for converting after uploading the required files.
- Open the metadata template for that book by clicking the metadata button in the upper right hand corner (after receiving the converted file in the case you have submitted the book for conversion)
- Scroll down to look for Permission session
- Check that the fields in the permission are filled in accurately according to the converted file
Priority
[Select "Y" for the relevant priority and provide an explanation]
- Resolving this bug is required for migration (Y/N)
- This can be prioritised after migration (Y/N)