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

As a user, I want to see a DOI on all DOI landing pages #7

Closed jordanpadams closed 2 years ago

jordanpadams commented 2 years ago

... so that I can meet the requirements of DOI landing pages and improve the usability of the site.

Engineering Details

Update ds-view query DOI Service for DOI instead of registry

💡 Description

Current PDS3 Data Set landing pages like this one return this for DOI: Unknown. Please contact the PDS Operator for assistance.

Let's update this to:

  1. First try to query the DOI Service for the DOI (*NOTE: For PDS3 data sets you will need to replace / with ``**)
  2. If exists, return it and link it like the viewBundle/viewCollection pages.
  3. If it does not exist, return:

    Unknown. Please contact the PDS Help Desk for assistance

Where PDS Help Desk is a link that pops up the feedback widget. (Note: currently functionality is kind of jarring to enable the pop-up. Ideally this should be an onClick event for the link that pops up the widget on the page the user is on. This is probably an event we should be using all over our website when we tell users to contact the Help Desk/Operator.)


UPDATE

Registry and the product metadata cannot be trusted. We should update all .JSP to query the DOI service for these DOIs.

jordanpadams commented 2 years ago

@acyu-jpl @c-suh see above. updated this ticket because we should now search DOI Service for DOIs from all JSP landing pages, not just the viewDataset.jsp.

c-suh commented 2 years ago

@jordanpadams this is now implemented on gamma for PDS3 and PDS4 products, e.g.

Clarification for PDS4 products:

jordanpadams commented 2 years ago

@c-suh yes, with one caveat. for PDS4 collections and bundles, we should ignore what is in the label/registry entirely, and instead always query from the DOI Service. Some of the data in the labels is wrong, so we just want to ignore that from here on out.

So for collections, we should get bundle LID and search the DOI Service for a DOI associated with that. Does that make sense?

jordanpadams commented 2 years ago

as for the the pages, they look great!

jordanpadams commented 2 years ago

@c-suh found a bug:

https://pds.nasa.gov/ds-view/pds/viewDataset.jsp?dsid=vg1/vg2-j-iris-3-rdr-v1.0

works great

but if the URL is encoded, it fails:

https://pds.nasa.gov/ds-view/pds/viewDataset.jsp?dsid=vg1%2fvg2-j-iris-3-rdr-v1.0

There should be Java library to decode URL query parameters prior to/as you are parsing them. If unsure I would ping the pdsen channel.

jordanpadams commented 2 years ago

found something quickly here: https://www.baeldung.com/java-url-encoding-decoding not sure now up-to-date / accurate it is

c-suh commented 2 years ago

@jordanpadams yup, I undid the logic from https://github.com/NASA-PDS/software-issues-repo/issues/5#issuecomment-809741620 which was applied to PDS4 Collections and Bundles and am using the DOI Service for all the JSP pages.

OK, I will address the encoding bug. Thank you for catching that!

c-suh commented 2 years ago

@jordanpadams I'm unable to replicate the issue (tried Chrome, Safari, and Firefox), but I checked the parameter in a few places and it seems to be decoding correctly. If you want me to look into this further, there are several points of entry to these ds-view pages; from where did you get the URL? This might help me pinpoint the problem area.

jordanpadams commented 2 years ago

@c-suh oops! this works! you are a go for release!

c-suh commented 2 years ago

Issue on prod2 and all AWS machines (multiple reasons for the latter. Will seek clarity from relevant parties).

tloubrieu-jpl commented 2 years ago

This task is paused while @c-suh is staging files for I&T.

c-suh commented 2 years ago

further paused for AWS lift-and-shift. Noting https://github.com/NASA-PDS/portal-tasks/issues/19 just came in as it's related.

c-suh commented 2 years ago

Improved and deployed to all 6 machines (changes also incorporate those from issue #19). A note that this does not work on prem prod2 because the DOI service is not deployed there. However, with the anticipated AWS lift-and-shift, that'll become irrelevant.