Metadata editor - data identification dates - support only date format#272
Metadata editor - data identification dates - support only date format#272josegar74 wants to merge 2 commits intometadata101:3.12.xfrom
Conversation
…t - xslt process to update existing metadata
| <PublicationDate>Value is required for Metadata publication date</PublicationDate> | ||
| <CreationDate>Value is required for Metadata creation date</CreationDate> | ||
| <MissingDate>Value is required for Date</MissingDate> | ||
| <InvalidDate>Date format is not valid. Should be: YYYY-MM-DD</InvalidDate> |
There was a problem hiding this comment.
As discussed (and shown in your screenshot) the date format can be in different formats depending on locale so maybe this message should be changed to be more generic.
There was a problem hiding this comment.
Suggest:
The date is entered using your current locale, it will store the date in YYYY-MM-DD format
There was a problem hiding this comment.
Alternate:
The date entered is not in the correct format for your locale
| xmlns:geonet="http://www.fao.org/geonetwork" | ||
| exclude-result-prefixes="#all"> | ||
|
|
||
| <xsl:template match="gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date[gco:Date and string-length(gco:Date) != 10]/gco:Date"> |
There was a problem hiding this comment.
Question?
Is this required for the following as well?
gmd:identificationInfo/*/gmd:extent/gmd:EX_Extent/gmd:temporalElement/gmd:EX_TemporalExtent/gmd:extent/gml:TimePeriod/gml:beginPosition
We currently have issues when publishing this date to Open Data. It does not support single date as a year so we have to add the 01-01 as well. It is possible that this is an Open Data issues and not necessarily an HNAP issue so I'm just asking the question.
Requires geonetwork/core-geonetwork#6394
HNAP requires date format only for the data identification dates, with this change the fields in the editor display allow to select only dates in the metadata editor and does not allow to change to year/month or year modes.
A validation rule is added also to validate the full date format:
YYYY-MM-DD: