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

Desktop project widget use wrong project on process creation #6345

Open
henning-gerhardt opened this issue Dec 10, 2024 · 2 comments
Open

Desktop project widget use wrong project on process creation #6345

henning-gerhardt opened this issue Dec 10, 2024 · 2 comments
Labels

Comments

@henning-gerhardt
Copy link
Collaborator

Describe the bug
If you use the project widget on the desktop page to create a new process then a wrong project is used which results that the created project in inside the wrong project and may have a wrong workflow assigned.

For example I used the "TG_16/17" project to create a new process inside this project which is using our default process template "PV-SLUB-Standard" from the desktop project widget:

Screenshot_2024-12-10_15-56-59

But in the following dialog this was visibile (I skipped the process search dialog as this dialog is not relevant):

Screenshot_2024-12-10_15-57-45

It is mentioned the process template "PV-SLUB-Dingler" which is from an other project which has different settings and even more a different workflow. Even the used templateId with value 3 and the projectId with value 13 in the URI pointing to the wrong process template "PV-SLUB-Dingler" (template id 3) and project "Dingler" (project Id 13) instead of the correct process template "PV-SLUB-Standard" (template id 1) and project "TG_16/17" (project id 2) which is working if I try to create a new process from the project list overview page:

Screenshot_2024-12-10_15-58-20

To Reproduce
Steps to reproduce the behavior:

  1. Click on the "+" sign of the desktop project widget to create a new process from the selected project
  2. See in the creating dialog a wrong content for the used process template and if you save the new process the process is assigned to an other project.

Expected behavior
Creating a new process from the desktop project widget should use the right project and process template on creating the process.
Release
3.6.0-SNAPSHOT, 3.7.1, 3.8.0-RC1, master branch

Additional context
This has something to do with the sorting of the projects inside the desktop project widget. If the sorting in https://github.com/kitodo/kitodo-production/blob/master/Kitodo/src/main/webapp/WEB-INF/templates/includes/desktop/projectsWidget.xhtml#L22 is removed than the process creating is working as expected but than the list of projects inside the project widget is not sorted anymore.

@henning-gerhardt henning-gerhardt changed the title Desktop project widget use wrong proejct on process creation Desktop project widget use wrong project on process creation Dec 10, 2024
@solth
Copy link
Member

solth commented Dec 10, 2024

Somehow related to the changes in #5802

@henning-gerhardt
Copy link
Collaborator Author

Yes, this is somehow related but the issue is only for creating new processes and not for the other usages there. The call to create new processes is total different to the other calls in this file.

Maybe the sorting introduced by PR 5802 is not needed if the list of projects is already correct sorted by the search engine so an additional sorting is not needed. The similar solution of the project list in the project view did not work as there are different data objects in both places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants