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

Error message not displayed when trying to save new workflow with existing title #6353

Open
solth opened this issue Dec 19, 2024 · 0 comments · May be fixed by #6354
Open

Error message not displayed when trying to save new workflow with existing title #6353

solth opened this issue Dec 19, 2024 · 0 comments · May be fixed by #6354
Labels
bug workflow workflow editor and configuration

Comments

@solth
Copy link
Member

solth commented Dec 19, 2024

Describe the bug
When trying to save a new workflow with the title of an already existing workflow, an error message is added to the internal logging files. On the frontend however, no corresponding message is displayed to the user. Instead, the user is redirected to the worfklow list and it seems like the workflow has been saved correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the "Workflows" tab on the "Projects" list page
  2. Create new workflow
  3. Add the title of an already existing workflow
  4. Click save

Expected behavior
When the user tries to save a new workflow with the title of an existing workflow, an corresponding error message should be displayed and the browser should stay in the workflow editor instead of redirecting the user to the workflow list.

Release
3.7.x, 3.8.x, main branch

Additional context
Similar to #6281

(partial) stack trace from log file:

[ERROR] 2024-12-19 08:54:53.600 [http-nio-8080-exec-4] WorkflowForm - org.kitodo.data.database.exceptions.DAOException: org.hibernate.exception.ConstraintViolationException: could not execute statement
org.kitodo.data.exceptions.DataException: org.kitodo.data.database.exceptions.DAOException: org.hibernate.exception.ConstraintViolationException: could not execute statement
        at org.kitodo.production.services.data.base.SearchService.save(SearchService.java:302) ~[classes/:?]
        at org.kitodo.production.forms.WorkflowForm.saveWorkflow(WorkflowForm.java:331) ~[classes/:?]
        at org.kitodo.production.forms.WorkflowForm.saveAndRedirect(WorkflowForm.java:151) ~[classes/:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
@solth solth added bug workflow workflow editor and configuration labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug workflow workflow editor and configuration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant