geonetwork / geonetwork/core-geonetwork

Humanized time for metadata summary ui page does not seem to work

Open
#8,409 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
521
Forks
514
Avg merge
6d 13h
Merged PRs (30d)
19

Description

This issue can be verified from the current GN4 deployment https://apps.titellus.net/geonetwork/srv/eng/catalog.search#/metadata/da3a37ec-863f-40be-8606-0263f75a7511

I have turn off the humanized time from ui setting.

![image](https://github.com/user-attachments/assets/8b0580fb-b51f-44c1-865d-447e27ddc933)

I can verify from my Edge browser's debug tool. The configuration does passed into the Javascript
![image](https://github.com/user-attachments/assets/369098f6-451b-490e-86ee-40cbea333afa)

https://github.com/geonetwork/core-geonetwork/blob/f65ae30906235eeedaaa28114102e8a437a35cdd/web-ui/src/main/resources/catalog/components/utility/UtilityService.js#L583

However. these two return statements do exactly the same thing
https://github.com/geonetwork/core-geonetwork/blob/f65ae30906235eeedaaa28114102e8a437a35cdd/web-ui/src/main/resources/catalog/components/utility/UtilityService.js#L602-L610

And they always return title as fromNow and value as converted time instead of original.
![image](https://github.com/user-attachments/assets/4f71fe9a-2def-4763-bce4-403991f26110)

In our case, we are using the HNAP schema. It has further zoned information, we want to show the original unconverted time in the title popup instead of converted time.

![image](https://github.com/user-attachments/assets/3910db22-c42d-403a-9fdd-2322e52cda86)

Contributor guide

Open the contributing guide

Research direction

Reproduce the metadata summary in the linked GN4 deployment, then inspect web-ui/src/main/resources/catalog/components/utility/UtilityService.js around lines 583 and 602-610. Check how the humanized-time setting affects the returned title and value; done means the disabled setting preserves the original zoned time in the title popup rather than displaying the converted time.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.