Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata editor - data identification dates - support only date format #272

Open
wants to merge 2 commits into
base: 3.12.x
Choose a base branch
from

Conversation

josegar74
Copy link
Contributor

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.

datepicker-dateonly

A validation rule is added also to validate the full date format: YYYY-MM-DD:

validation-rule

@josegar74 josegar74 added this to the 3.12.6 milestone Jun 15, 2022
…t - xslt process to update existing metadata
@@ -18,6 +18,7 @@
<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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest:

The date is entered using your current locale, it will store the date in YYYY-MM-DD format

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">
Copy link
Contributor

@ianwallen ianwallen Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@josegar74 josegar74 modified the milestones: 3.12.6, 3.12.7 Jun 22, 2022
@ianwallen ianwallen modified the milestones: 3.12.7, 3.12.8 Oct 5, 2022
@josegar74 josegar74 modified the milestones: 3.12.8, 3.10.9 Dec 12, 2022
@ianwallen ianwallen modified the milestones: 3.10.9, 3.12.9 Feb 4, 2023
@josegar74 josegar74 modified the milestones: 3.12.9, 3.12.10 Mar 10, 2023
@josegar74 josegar74 modified the milestones: 3.12.10, 3.12.11 May 10, 2023
@josegar74 josegar74 modified the milestones: 3.12.11, 3.12.12 Oct 4, 2023
@josegar74 josegar74 modified the milestones: 3.12.12, 3.12.13 Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants