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

Standard / ISO19139 / Fix removal of online source when multiple transfer options block are used. #8281

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

fxprunayre
Copy link
Member

Follow up of #7431

Address the case when multiple transfer option groups are used. Following discussion in #7431 (comment)

Can be tested with https://gist.github.com/fxprunayre/5641c474514a9d5159ef1479a030a117

image

Also add support for online sources in distributor blocks.

For ISO19115-3, it is a bit more complicated as online resources can be used in portrayal, feature catalogue, dq report, ... https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/index-fields/link-utility.xsl#L78-L90

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

Funded by EEA

@fxprunayre fxprunayre added this to the 4.4.6 milestone Jul 29, 2024
transfer options block are used.

Follow up of #7431
@ianwallen
Copy link
Contributor

@fxprunayre
Odd - I tested your changed by cherry picking the changes into our 4.2 release and I could not delete the resource.

I have made some changes locally to fix the issue with updating/deleting but still need to do some testing on the main branch to ensure it still works. I will push a PR against your branch shortly to show you the changes.

@ianwallen
Copy link
Contributor

I created a PR to be merged into this PR on the work I had done so far #8291.

Copy link

sonarcloud bot commented Aug 5, 2024

Copy link
Contributor

@tylerjmchugh tylerjmchugh left a comment

Choose a reason for hiding this comment

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

Tested on main, works well

@fxprunayre fxprunayre merged commit 4b0e20d into main Aug 9, 2024
9 checks passed
@fxprunayre fxprunayre deleted the 44-onlinesrcremoval branch August 9, 2024 04:47
@geonetworkbuild
Copy link
Collaborator

The backport to 4.2.x failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply c8d298ca4f... Standard / ISO19139 / Fix removal of online source when multiple
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging schemas/iso19139/src/main/plugin/iso19139/extract-relations.xsl
CONFLICT (content): Merge conflict in schemas/iso19139/src/main/plugin/iso19139/extract-relations.xsl
Auto-merging schemas/iso19139/src/main/plugin/iso19139/index-fields/index.xsl
CONFLICT (content): Merge conflict in schemas/iso19139/src/main/plugin/iso19139/index-fields/index.xsl

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-8281-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick c8d298ca4fd2f46052e7048575f3c4e6df1ba3ce,85af8e4d7e42e546df1b0e62b64871cbf1811318
# Push it to GitHub
git push --set-upstream origin backport-8281-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.x

Then, create a pull request where the base branch is 4.2.x and the compare/head branch is backport-8281-to-4.2.x.

ianwallen added a commit that referenced this pull request Aug 9, 2024
…sfer options block are used. (#8281)

* Standard / ISO19139 / Fix removal of online source when multiple
transfer options block are used.

Follow up of #7431

* Fix online resource update/delete so that it supports multiple gmd:MD_DigitalTransferOptions blocks.

---------

Co-authored-by: Ian Allen <[email protected]>
ianwallen added a commit that referenced this pull request Aug 9, 2024
…sfer options block are used. (#8281) (#8297)

* Standard / ISO19139 / Fix removal of online source when multiple
transfer options block are used.

Follow up of #7431

* Fix online resource update/delete so that it supports multiple gmd:MD_DigitalTransferOptions blocks.

---------

Co-authored-by: François Prunayre <[email protected]>
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.

4 participants