Skip to content

Batch edit / update clipboard paste error message#9293

Open
josegar74 wants to merge 2 commits into
geonetwork:mainfrom
GeoCat:44-batchedit-clipboardpasteerrormessage
Open

Batch edit / update clipboard paste error message#9293
josegar74 wants to merge 2 commits into
geonetwork:mainfrom
GeoCat:44-batchedit-clipboardpasteerrormessage

Conversation

@josegar74

Copy link
Copy Markdown
Member

When batch edit paste clipboard fails due to unexpected format (expects a JSON with the copied value of another batch edit rule), displays a cryptic error, including even the exception message.

image

The user doesn't really cares about JSON or whatever format is used internally by the application. Updated to avoid displaying the exception and showing a more friendly message.

image

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

@josegar74 josegar74 added this to the 4.4.11 milestone May 26, 2026
@josegar74
josegar74 requested review from GeoSander and fxprunayre May 26, 2026 12:57
"recordCreationOptions": "Record creation options",
"batchEditConfigIsNotValid": "Batch edit configuration is invalid. It must be a JSON <pre>{\"insertMode\": \"gn_add\", \"xpath\": \"...\", \"value\": \"...\"}</pre>",
"batchEditConfigIsNotJson": "Batch edit configuration is not JSON.",
"batchEditConfigIsNotValid": "Batch edit configuration is invalid. Copy the configuration from another batch edit rule.",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@josegar74 Since this is about copying (not pasting) and the error happens when the configuration has bad input, I think it's best if the message says:

"Failed to copy invalid batch edit configuration. Please review and try again."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@GeoSander, it's about pasting.

The problem with this function is that it’s rather confusing. First, you have to copy another rule and paste it into the existing one. The problem arises when you paste it.

It could be implemented with just a Duplicate button, that doesn't require any clipboard interaction.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes @josegar74, I understood that shortly after my comment. Never used this feature but now that I saw it in action, I agree that the functionality is quite confusing.

The buttons could be clarified (more clear copy/paste icons), but what I think is cleaner is the following:

  • When you select an example in the dropdown, nothing happens yet.
  • Next to the Examples dropdown, there should be an "apply" button (or something with a clear icon for that purpose). This behaves in much the same way as the + button right now.
  • When you click that button, it fills in the expression in the existing form and not in a new form underneath the other one.
  • This would remove the need for copy/paste buttons and I think the UX/UI will be much more clear.

Does that make sense?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@GeoSander

  • When you select an example in the dropdown, nothing happens yet.

When I select an example the form below is replaced with the example.

  • Next to the Examples dropdown, there should be an "apply" button (or something with a clear icon for that purpose). This behaves in much the same way as the + button right now.

The user most probably needs do changes in the fields like Condition or Text or XML value, or even the XPATH expression, before clicking the + button.

I'm not sure if the behaviour described by you would be the most appropiate.

  • When you click that button, it fills in the expression in the existing form and not in a new form underneath the other one.

I'm not following this.

  • This would remove the need for copy/paste buttons and I think the UX/UI will be much more clear.

I'm not following this either, as the copy & paste has nothing to do with the examples.

@josegar74 josegar74 modified the milestones: 4.4.11, 4.4.12 Jun 2, 2026
@fxprunayre fxprunayre modified the milestones: 4.4.12, 4.4.13 Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants