AtlasOfLivingAustralia / la-pipelines

Living Atlas Pipelines extensions
3 stars 4 forks source link

Review and fix missing DwC fields in record view page #478

Closed nickdos closed 3 years ago

nickdos commented 3 years ago

As reported in AtlasOfLivingAustralia/data-management/issues/690#, @sadeghim pointed out the preparations field is not being displayed on the record page view:

https://biocache.ala.org.au/occurrences/ca374cf5-b1c9-4ce2-9d84-ea434bf49950

but the field is coming through in the JSON data.

The DwC fields for record pages is very old GSP code that has hard-coded entries for each field. It was based on the data ALA indexed at the time and is now out of date and not in sync with the DwC spec.

I suggest we initially look at the code and determine which other fields are missing. We can then decide if we just add them to the existing code or do a refactor and externally source the definitive list of DwC fields from the DwC GH repo, so we don't have to worry about changes and additions to the DwC spec in the future. Note that the downloads-plugin already does this, so there is existing code/pattern we can reuse.

sadeghim commented 3 years ago

Just to add another issue to this case, the preparation field doesn't appear in the raw section either.

nickdos commented 3 years ago

Just to add another issue to this case, the preparation field doesn't appear in the raw section either.

That is a bit odd... might not matter to UI record page but might be an issue for other aspects of using the data. @djtfmartin should this DwC field have at least data in raw as well as processed? Or is it fine to be only populated in processed section?

E.g. search for preparations on https://biocache.ala.org.au/ws/occurrences/ca374cf5-b1c9-4ce2-9d84-ea434bf49950 and it only appears once.

djtfmartin commented 3 years ago

@nickdos no, this is a bug in biocache-service. I think its only affecting preparations.

djtfmartin commented 3 years ago

preparations is back after a reindex. The problem was the addition of raw_preparations to the schema which was added when we where mapping to a vocab. This work was removed. This can be closed.