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

Return xml inside JSON status #8579

Conversation

wangf1122
Copy link
Collaborator

@wangf1122 wangf1122 commented Dec 23, 2024

After batch editing several records, the history is the status in the database is stored as JSON and XML embedded.

image

When trying to view the previous and current version from UI:

image

The API specify the format as XML

So the browser cannot render the text:
image

The JSON format is not very compactible to the API. I am adding a JSON conversion to XML to render the API properly.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@CLAassistant
Copy link

CLAassistant commented Dec 23, 2024

CLA assistant check
All committers have signed the CLA.

@wangf1122 wangf1122 marked this pull request as ready for review December 23, 2024 20:45
@josegar74 josegar74 added this to the 4.4.7 milestone Dec 24, 2024
Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

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

I works, but at the same time is not very consistent to store in the same field sometimes xml content and another times json content.

It would be better to store always JSON and with the updated XML and some additional information with the context of the changes: batch editor (as it is now), metadata editor, etc. But this is out of the scope for this pull request.

@josegar74 josegar74 merged commit 9d3e585 into geonetwork:main Dec 24, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants