NASA-PDS / portal-tasks

PDS Portal tasks repo used to track update requests for the website. Actual code and website are managed in separate private repo
https://pds.nasa.gov
0 stars 0 forks source link

viewBundle not working properly for DOI search logic #19

Closed jordanpadams closed 2 years ago

jordanpadams commented 2 years ago

🐛 Describe the bug

See https://pds.nasa.gov/ds-view/pds/viewBundle.jsp?identifier=urn%3Anasa%3Apds%3Ainsight_cameras&version=1.0 as an example. This should return https://doi.org/10.17189/1510484

https://pds.nasa.gov/tools/doi/#/search/urn:nasa:pds:insight_cameras::1.0

Additionally, there is a typo in the auto-response for multiple DOIs.

c-suh commented 2 years ago

@jordanpadams thank you for catching the typo. And, right, I can fix that logic to search more specifically. Does the version matter? The query parameter for the viewBundle.jsp link says version 1.0, but the page itself indicates version 11.0 (urn:nasa:pds:insight_cameras::11.0). Possible bug to investigate?

Note: this task (subset of/related to task https://github.com/NASA-PDS/portal-tasks/issues/7) is paused for AWS lift-and-shift.

jordanpadams commented 2 years ago

@c-suh that is not a bug. 2 things going on here:

  1. the DOI is for v1.0, but we don't necessarily update the DOI metadata with the latest version of the product when it is released so it will always (or at least for a while until we can automate the update) link to v1.0, but we want to show the latest.
  2. the legacy registry, that ds-view queries against, only contains the latest version of the of the products, but per (1) above (and just in general for supporting past versions) we want this to show the latest.
jordanpadams commented 2 years ago

algorithm:

  1. search for lidvid u:n:pds:insight_cameras::11.0
  2. if not found, search by lid - u:n:pds:insight_cameras::* (replace 11.0 with *)
  3. if multiple, display "Multiple DOIs found. Use [DOI Search](link here) to select the most appropriate."
c-suh commented 2 years ago

Fixes have been tested and deployed to all 6 machines. A pull request has been opened in the internal repository, pds4-java.