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

API accepts Reserve submissions with invalid LIDVIDs #191

Closed
c-suh opened this issue Apr 28, 2021 · 2 comments · Fixed by #195
Closed

API accepts Reserve submissions with invalid LIDVIDs #191

c-suh opened this issue Apr 28, 2021 · 2 comments · Fixed by #195
Assignees
Labels
B12.0 bug Something isn't working s.medium

Comments

@c-suh
Copy link

c-suh commented Apr 28, 2021

🐛 Describe the bug

An item to Reserve can be submitted successfully with invalid LIDVIDs, e.g. urn, %$, . (a period), urn:nasa:pds:<product>:<collection>:<bundle> (without ::<version>)

📜 To Reproduce

Steps to reproduce the behavior:

  1. Fill in Excel template with reserve information
  2. Connect to the API with ssh -L 8085:localhost:8080 pds-dev3, start local instance of DOI UI with npm start from root folder of https://github.com/NASA-PDS/pds-doi-ui/tree/search-metadata (currently not merged into master branch), and go to localhost:3000 in your browser
  3. Click on 'Reserve' in the top right
  4. Upload file from step 1, fill in or select values for Submitter Email and Node, and click 'Reserve' button at bottom
  5. If submission is successful (message with green background), click header 'DOI Reserve And Release' to see table of all items; your submitted item should be on top. OR go to http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois for full list and use Cmd/Ctrl + F to find your entry.

🕵️ Expected behavior

In the Excel sheet, the relevant field is column G (related resource LIDVID).

  • If this is left blank, an error is shown on submission (personal opinion, the error message is not helpful to users: Error: CriticalDOIException. Description: argument of type 'float' is not iterable)
  • Otherwise, if no other fields cause errors, the submission is accepted.

📚 Version of Software Used

N/A

🩺 Test Data / Additional context

  • an attempted submission using an existing title will throw an error (unless it's same title AND same lidvid, then it's accepted, like the highlights in the screenshot below)
  • use http://localhost:8085/PDS_APIs/pds_doi_api/0.1/dois or refer to the table on the DOI UI landing page to see existing records

🏞Screenshots

Screen Shot 2021-04-27 at 6 08 46 PM

🖥 System Info

  • OS: irrelevant
  • Browser: irrelevant
  • Version: irrelevant

** 🦄 Applicable requirements**

@c-suh c-suh added bug Something isn't working needs:triage labels Apr 28, 2021
@c-suh
Copy link
Author

c-suh commented Apr 28, 2021

@tloubrieu-jpl is this enough information? I changed it slightly when I realized that it accepts any value for a LIDVID, not just LIDs without a VID

@tloubrieu-jpl
Copy link
Member

@collinss-jpl is adding rules to validate the lidvid provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B12.0 bug Something isn't working s.medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants