-
Notifications
You must be signed in to change notification settings - Fork 68
Move linking child processes to a separate dialog in metadata editor #6860
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
base: main
Are you sure you want to change the base?
Conversation
4260337 to
429efa6
Compare
df54bda to
9a56e2d
Compare
|
Yes, very good idea, which works nice on first tests. Edit: ID search seems to work. It seems like i can only search for processes which are not already linked, which is the right behaviour. So if the process is not already linked or is unlinked and then this unlinking is saved, searching for ID and title works. |
There might be some quirks in the general functionality of this feature - some search results I got sometimes seemed incomplete, but I was unable to detect a pattern. In any way, I did not change the implementation of the search (which should therefore be identical to the |
Good idea, I will add a corresponding check! |
|
@BartChris I added a check for document types that are allowed as child structures for the currently selected tree node. I no such document type is allowed as child structure, the context menu option to link subordinate processes is not displayed. Due to the complexity of this check I moved it from |
Kitodo/src/main/java/org/kitodo/production/services/dataeditor/DataEditorService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with your changes and only added one suggestion for simplification; i had hoped that we could do this useful check for substructures with less code, or could reuse existing methods from ProcessService (canCreateChildProcess()) but underestimated the complexity.
|
@BartChris thanks for the review. I applied your code suggestion.
Maybe there is room for reducing the complexity, but this is the simplest sollution I could come up with. |
…/DataEditorService.java Co-authored-by: Christoph Bartmann <[email protected]>
1d7e419 to
4054bcc
Compare

I have spoken to quite a few Kitodo users over the years who were not aware of the option to link subordinate processes via the "Neues Strukturelement" dialog in the metadata editor.
That dialog can be opened using the context menu option "Element hinzufügen" of the structure tree in the metadata editor of Kitodo:
The reason for the option to link processes being so little known among users is that the corresponding functionality is well hidden behind a inconspicuous little checkbox in the dialog that many users don't notice:
Activating this checkbox completely replaces the content of the dialog with a search mask to link a subordinate process instead of adding a new structural element:
Apart from effectively hiding this option, the whole dialog with conditionally rendered components and buttons makes for very awkward template code.
To improve this situation I separated the two functionalities into separate dialogs that can now be opened directly via individual context menu options.
The first option, "Element hinzufügen":
leads to the dedicated dialog for adding structural elements:
and the second option, "Untergeordneten Vorgang verknüpfen":
leads to the dedicated dialog for linking processes: