Fix: Determine workflow configuration by checking group assignment#535
Open
kskaiser wants to merge 1 commit into4Science:main-crisfrom
Open
Fix: Determine workflow configuration by checking group assignment#535kskaiser wants to merge 1 commit into4Science:main-crisfrom
kskaiser wants to merge 1 commit into4Science:main-crisfrom
Conversation
The `isWorkflowConfigured` method previously relied on comparing the workflow group object's name against expected string values. This caused issues with migrated data where workflow group names did not follow the naming conventions of the new DSpace version, leading to incorrect workflow configuration detection. This commit updates the implementation to be independent of group names entirely. It now directly checks for the existence of a configured workflow group object that is assigned to a specific collection's workflow step. This ensures correct workflow status determination for both newly created and migrated collections. A new test class with integration tests is added to test the `XmlWorkflowItemService.isWorkflowConfigured` method. fixes 4Science#534 Signed-off-by: Katharina Kaiser <katharina.kaiser@tuwien.ac.at>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Description
XMLWorkflowItemService#isWorkflowConfigured uses a pattern-based approach for identifying potential groups by name that would allow to edit/review an item. This does not work for migrated configurations <7.x; they use a different pattern. Furthermore, the existence of a group with a matching name says nothing about whether a workflow is actually configured for the collection.
Instructions for Reviewers
List of changes in this PR:
true.The new test is
XmlWorkflowItemServiceIT. Run it:Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.