Skip to content

Commit

Permalink
Merge pull request #862 from geonetwork/DH-mapping-new-fields
Browse files Browse the repository at this point in the history
feat(DH): Change datasetUpdated, datasetCreated to resourceUpdated, resourceCreated in GN4 mapping
  • Loading branch information
Angi-Kinas authored Apr 23, 2024
2 parents a288b23 + 90887a9 commit 139106e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libs/api/metadata-converter/src/lib/gn4/gn4.converter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,6 @@ describe('Gn4Converter', () => {
role: 'publisher',
},
],
datasetCreated: new Date('2012-01-01T00:00:00.000Z'),
datasetUpdated: new Date('2021-12-13T00:00:00.000Z'),
distributions: [
{
url: new URL(
Expand Down Expand Up @@ -1626,6 +1624,8 @@ describe('Gn4Converter', () => {
recordCreated: new Date('2021-10-05T12:48:57.678Z'),
recordUpdated: new Date('2021-10-05T12:48:57.678Z'),
recordPublished: new Date('2021-04-01T00:00:00.000Z'),
resourceCreated: new Date('2012-01-01T00:00:00.000Z'),
resourceUpdated: new Date('2021-12-13T00:00:00.000Z'),
status: 'ongoing',
topics: ['Installations de suivi environnemental', 'Océans'],
title: 'Surval - Données par paramètre',
Expand Down
4 changes: 2 additions & 2 deletions libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ export class Gn4FieldMapper {
}),
creationDateForResource: (output, source) => ({
...output,
datasetCreated: toDate(
resourceCreated: toDate(
getFirstValue(selectField<string>(source, 'creationDateForResource'))
),
}),
revisionDateForResource: (output, source) => ({
...output,
datasetUpdated: toDate(
resourceUpdated: toDate(
getFirstValue(selectField<string>(source, 'revisionDateForResource'))
),
}),
Expand Down

0 comments on commit 139106e

Please sign in to comment.