kitodo-production
kitodo-production copied to clipboard
Unhandled `NullPointerException` when using KitodoScript `addDataToIssues`
Describe the bug
A NullPointerException is thrown when applying the KitodoScript addDataToIssues to selected processes that do not contain structure elements with the name supplied using the parameter type.
To Reproduce Steps to reproduce the behavior:
- Go to 'Processes' page
- Select some processes via checkbox
- Click on 'Actions' menu in the footer
- Select 'Execute KitodoScript' from list of options
- Select action 'addDataToIssues'
- Replace 'PeriodicalIssue' as value of 'type' parameter with some string that does not exist as structure element in selected processes
- Click button 'Execute Kitodo script'
- See error
Expected behavior
The NullPointerException should be prevented or handled. Instead of seeing a stack trace, the user should be informed about the nature of the problem in a popup dialog or error message.
Screenshots
Release 3.7.0-SNAPSHOT