online resource language and its validation #378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces PR #371
This is an unusual scenario. The user select online resource language as eng; fra. But manually change it to eng. But the user may forget change in the French field.
So the onlinesrc-add process sends payload
desc: eng#Web Service;ESRI REST;eng|fra#Service Web;ESRI REST;eng,fra
Here is issue 1), the onlinesrc-add only detect the desc string to be end with fra which is not precised. It is better to break the string to check each eng#Web Service;ESRI REST;eng and fra#Service Web;ESRI REST;eng,fra to be end with fra or default to English.
Issue 2) if we set up the online resource by accidentally in issue 1) and add another normal French resource. We will end up have two French resource
The current logic only calculate if there are total of two online resources and it does not care if they are in English or French. Therefore it will not return any error at all.
iso19139.ca.HNAP/src/main/plugin/iso19139.ca.HNAP/schematron/schematron-rules-common.sch
Lines 526 to 530 in 5f7a9d5
However in the older version 3.6 which FGP uses, the validation does counting both English and French online resources
iso19139.ca.HNAP/src/main/plugin/iso19139.nap/schematron/schematron-rules-iso19139.nap-internal.sch
Lines 692 to 698 in 5a2ca48
Therefore most recent validation doesn't sync with FGP very well. So data validates as pass but cannot be publish to FGP due to the inconsistent validation. The FGP validation works better and we should bring back the old logic in 3.6.
This error will be captured as: