geonetwork / geonetwork/core-geonetwork
Update metadata links in emails to support formatter views
- Dominant language
- Java
- Stars
- 521
- Forks
- 514
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 19
Description
**Is your feature request related to a problem? Please describe.**
Related to the discussion on this PR https://github.com/geonetwork/core-geonetwork/pull/8931
Emails with links currently go to the metadata api view which is a restricted format which was intended to be used in browsers with limited capabilities. i.e. PDF printer.
The email link was switched to this link because OIDC logins will use the # fragment during the login process and it will end up redirecting to the search main page instead of the record in the link.
So the goal would be to have the link sent the user to main record display instead of the api view display as it is more user friendly.
**Describe the solution you'd like**
As described in the PR comment the following main changes would be required.
- The api record view would be updated to support a formatter view parameter to be redirected to. i.e. ?formatter=defaultView or ?formatter=full. (The format of the url may need to be discussed) If this parameter exists then it would validate that the formatter exists and if it is valid then it would return a redirection to the record using the correct formatter.
- It would also require the formatter configuration to have an option to identify the formatter to be used in email links. That could be done in the formatter configurations.
- Update all locations where a metadata link is created in an email to apply the formatter parameter in the link if there is an email formatter configured.
**Describe alternatives you've considered**
No other alternatives have been identified.
**Additional context**
Note sure if this option should also be applied to permalinks?
Reference the following for more details.
https://github.com/geonetwork/core-geonetwork/pull/8931
Contributor guide
Research direction
Start with the discussion in pull request 8931, then trace the API record view, formatter configurations, and the locations where metadata links are created in emails. Clarify the formatter parameter and permalink questions before determining the affected email paths; done means valid configured formatters redirect to the intended record view and email links use the configured formatter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100