kitodo-production icon indicating copy to clipboard operation
kitodo-production copied to clipboard

Unhandled `NullPointerException` when using KitodoScript `addDataToIssues`

Open solth opened this issue 1 year ago • 0 comments

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:

  1. Go to 'Processes' page
  2. Select some processes via checkbox
  3. Click on 'Actions' menu in the footer
  4. Select 'Execute KitodoScript' from list of options
  5. Select action 'addDataToIssues'
  6. Replace 'PeriodicalIssue' as value of 'type' parameter with some string that does not exist as structure element in selected processes
  7. Click button 'Execute Kitodo script'
  8. 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 Bildschirmfoto 2024-03-04 um 11 58 30

Release 3.7.0-SNAPSHOT

solth avatar Mar 04 '24 11:03 solth