Closed RayPlante closed 4 years ago
Built and confirmed error exists , i.e. there are no research topics appearing in this internal Publish record https://localhost/od/id/0531A570681DB5D3A1EE2F169DD3B8CE1491
Rebuilt with metadata server fix, and validated that both the landing page has the correct Research Topics and also the Nerdm file has both theme and topic.tag showing the correct "Physics: Optical physics" values
This PR addresses ticket ODD-859 which reported that themes that users selected in MIDAS were not appearing as research themes on the landing page; further, many records were showing in the SDP search results as having the research themes as "unspecified". This PR uses an underlying fix applied to
oar-metadata
(PR#35).As described in
oar-metadata
PR#35, themes are handled in a special way in the PDR publishing system because in the original, pre-PDR POD records, full taxonomy terms were not be properly specified: only the lowest (most-specific) term was being set. For example, "Glycomics" would be specified rather than "Bioscience: Glycomics". (This means in the former case, the record would not match a search for "Bioscience".) Special code was put into the PDR publishing code to detect this error and replace the theme term with its fully specified term. However, this code was only applied to records ingest from the original PDL; it was not getting applied to new submissions via MIDAS. This produced a NERDm record with an uncorrectedtheme
property an emptytopic
property (which is used by the SDP and the landing page). This PR applies the special theme handling to new submissions from MIDAS.Review and Testing
This fix should be tested using the integration branch of
oar-docker
. After checking out the integration branch of an existingoar-docker
clone, be sure to rungit pull
to get the latest changes. The fix is demonstrated using the internal "publish" application, so change into thepublish
directory within theoar-docker
repo directory.Demonstrating the error
I recommend that you first run the publish application without the fix, building it with the latest releases already set in the deployment file:
Next access the landing page for a built-in MIDAS submission at https://localhost/od/id/0531A570681DB5D3A1EE2F169DD3B8CE1491.
Notice the following:
mdserver/sample_review/1491/_pod.json
; look for thetheme
property and notice that its value is "Optical physics" (not "Physics: Optical Physics").data/pdr/mdserv/0531A570681DB5D3A1EE2F169DD3B8CE1491/metadata/nerdm.json
; notice itstheme
property also has the incorrect term, "Optical physics" and thetopic
property is empty (as in[]
).Testing the fix
To test the fix, bring down the application and rebuild it with the fix to mdserver:
Load the same landing page (https://localhost/od/id/0531A570681DB5D3A1EE2F169DD3B8CE1491), and notice the following:
data/pdr/mdserv/0531A570681DB5D3A1EE2F169DD3B8CE1491/metadata/nerdm.json
; notice itstheme
property now has the correct term, "Physics: Optical physics" and thetopic
property contains this term, too.