In chapter-processed book metadata: When OA toggle is on, and license type = 'Other', user should be required to provide a license URL
Expected behaviour
Ability to migrate our chapter-processed books and collection metadata. Need to be able to have a license URL field in chapter processed book and collection metadata, when the user turns the OA toggle on and chooses 'Other' as the license type, the field should appear below the license type and validate that the input is a URL. The URL should also be written into the book metadata XML, and for the case of collections, in the collection metadata XML.
Current behaviour
Unable to migrate Other license URLs to be tagged as attributes. No field appears for this.
Steps to reproduce -
See:
Try to enter a custom license URL if select yes OA and Other, which should require a license URL to be tagged as an attribute - see attempt here:
https://nih.webex.com/recordingservice/sites/nih/recording/b6fb2930fe66103a967f42aca848dcda/playback
Tagging target need to be able to produce / have BCMS write:
<license xmlns:xlink="http://www.w3.org/1999/xlink" license-type="open-access"
xlink:href="https://www.ncbi.nlm.nih.gov/books/NBK138602/">
<license-p>GeneReviews® chapters are owned by the University of Washington. Permission is
hereby granted to reproduce, distribute, and translate copies of content materials for
noncommercial research purposes only, provided that (i) credit for source (<ext-link
ext-link-type="uri" xlink:href="http://www.genereviews.org/"
>http://www.genereviews.org/</ext-link>) and copyright (© 1993-2020 University of
Washington) are included with each copy; (ii) a link to the original material is provided
whenever the material is published elsewhere on the Web; and (iii) reproducers,
distributors, and/or translators comply with the <related-object source-id="gene"
document-id="GRcopyright_permiss">GeneReviews® Copyright Notice and Usage
Disclaimer</related-object>. No further modifications are allowed. For clarity, excerpts
of GeneReviews chapters for use in lab reports and clinic notes are a permitted
use.</license-p>
<license-p>For more information, see the <related-object source-id="gene"
document-id="GRcopyright_permiss">GeneReviews® Copyright Notice and Usage
Disclaimer</related-object>.</license-p>
<license-p>For questions regarding permissions or whether a specified use is allowed,
contact: <email>admasst@uw.edu</email>.</license-p>
</license>
(There are other examples of this in collections / chapter-processed books we need to migrate)
Solution
In a chapter processed book, in book metadata, when the user turns the OA toggle on, and then chooses 'Other' as the license type, a required field should appear below the license type and validate that the input is a URL starting with http://
or https://
. The URL should then be written into the book metadata XML at the same time that the other book metadata is written. The XML format should be as below, where the second line is the URL the user input (https://www.ncbi.nlm.nih.gov/books/NBK138602/).
<license xmlns:xlink="http://www.w3.org/1999/xlink" license-type="open-access"
xlink:href="https://www.ncbi.nlm.nih.gov/books/NBK138602/">
NCBI's priority feedback
Y, migration blocker
QA Steps / Acceptance Criteria
- Create a chapter-processed book.
- In the Metadata of the book, fill in the required fields and also turn the OA toggle on, and choose 'Other' as the license type.
- Notice that the fields "License url" is now editable.
- Type a valid url in the License url.
- Upload a chapter and submit it for conversion.
- In the converted file, check the XML format includes the license url, as per the example below:
<license license-type="open-access" xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="https://www.ncbi.nlm.nih.gov/books/NBK138602/"><license-p>license
`statement</license-p></license>
- Go back to the Metadata Modal and see that the "License URL" is still there as entered