Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field volume in the deposit should not be stricter than its equivalent in the document #878

Closed
pronguen opened this issue Aug 8, 2022 · 0 comments · Fixed by #879
Closed
Labels
client request correction An implemented feature doesn't work as expected effort: minor Solved quickly f: deposits Related to deposits f: editor Concerns editor based on JSON schema AND custom editor p-Medium To set a medium priority.

Comments

@pronguen
Copy link
Contributor

pronguen commented Aug 8, 2022

How it works

Deposit: field volume has the following regex "^[0-9]+$":
https://github.com/rero/sonar/blob/master/sonar/modules/deposits/jsonschemas/deposits/deposit-v1.0.0_src.json#L574

This is not the case in the document:
https://github.com/rero/sonar/blob/master/sonar/modules/documents/jsonschemas/documents/document-v1.0.0_src.json#L1503

Improvement suggestion

Put the same validation logic in the deposit than in the document, that is: more flexible.

@pronguen pronguen added correction An implemented feature doesn't work as expected f: deposits Related to deposits f: editor Concerns editor based on JSON schema AND custom editor effort: minor Solved quickly p-Medium To set a medium priority. labels Aug 8, 2022
PascalRepond added a commit to PascalRepond/sonar that referenced this issue Aug 8, 2022
* `volume`, `number` and `pages` deposit fields should not reject values
that are accepted by the equivalent fields in the document.
* Allows more flexibility for submitters and prevents API rejections
* Closes rero#878

Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>
PascalRepond added a commit to PascalRepond/sonar that referenced this issue Aug 8, 2022
* `volume`, `number` and `pages` deposit fields should not reject values
that are accepted by the equivalent fields in the document.
* Allows more flexibility for submitters and prevents API rejections.
* Closes rero#878.

Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>
PascalRepond added a commit that referenced this issue Aug 9, 2022
* `volume`, `number` and `pages` deposit fields should not reject values
that are accepted by the equivalent fields in the document.
* Allows more flexibility for submitters and prevents API rejections.
* Closes #878.

Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client request correction An implemented feature doesn't work as expected effort: minor Solved quickly f: deposits Related to deposits f: editor Concerns editor based on JSON schema AND custom editor p-Medium To set a medium priority.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants