metadata101 / iso19139.ca.HNAP

ISO Harmonized North American Profile (HNAP)
GNU General Public License v2.0
4 stars 19 forks source link

Issue with inserting online resource format #314

Open ianwallen opened 1 year ago

ianwallen commented 1 year ago

There is a bug when attempting to add an online resource format such as ASCII (CDED)

image

When validating, it produces the following error. image

The reason, we get this error is because the data is store as

image

The validation is validating based on the real code which is CDED ASCII and it identifies that it is not the same as ASCII (CDED) and fails.

There was an attempt to fix this but with PR #259. However this PR was checking against the English code/French Code - when it should be checking the main code.

The problem is that the main code is not in the data

1 - Is there a bug in saving the data - i.e should it have the main code stored instead of translated values? This does not seem correct as it would be difficult to program to check all codes. 2 - Should the validation accept Eng code, Fra codes, and main codes in the check?

ianwallen commented 1 year ago

@CarHenkel Can you test your environment with using values like ASCII (CDED) which has different values for Eng code (ASCII (CDED)), Fra code (ASCII (MNEC)) and main code CDED ASCII

With the change reverted, the validation should fail on that item.

ianwallen commented 1 year ago

It seems like there are 2 options. 1 Use bilingual values for the format – in which case the PR #259 can be re-applied and then we need to update the xslt for importing FGP data so that it update the codes to bilingual values. 2 Update the picker so that it stores the code instead of the translation values. This seems to be related to https://github.com/metadata101/iso19139.ca.HNAP/issues/95

Not sure what the best approach is for this?

CarHenkel commented 1 year ago

@CarHenkel Can you test your environment with using values like ASCII (CDED) which has different values for Eng code (ASCII (CDED)), Fra code (ASCII (MNEC)) and main code CDED ASCII

With the change reverted, the validation should fail on that item.

Hi @ianwallen

In ECCC environment: ASCII (CDED) - Passes Validation ASCII GRID - Passes Validation ASCII (MNEC) - Passes Validation EN/FR Dropdown list item in fr is 'ASCII (CDED)'. Once selected, it renders as 'ASCII (MNEC)' in fr UI outside of the Create an Online Resource dialog. CDED ASCII - Not an available option

jodygarnett commented 1 year ago

@bo-lu can you check if the code is being stored by FGP (discussion here indicates that storing the multi-lingual label would be appropriate)