-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
DS-3914: Fix community defiliation #2178
Conversation
This fixes in issue in the defiliate method of the community filiator. The child and parent relations should be managed using the provided methods of the Community. This changes the visibility of Community.removeSubCommunity() to public, but Community.removeParentCommunity() was public before already.
This removes the loops for checking if a community is contained in a list of communities. Community.equals() does the same check, so we simply can use contains().
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.
+1 looks good to me. Not tested (yet).
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.
Tested and confirmed the fix.
@AlexanderS , thanks for the fix. Could you port this to master? |
@terrywbrady Sure, see #2284. |
Hello everyone. I modified the files CommunityFiliator.java and Community.java inmy dspace 6.3, then compiled with "mvn -U clean package" and "ant update" but the command ./dspace community-filiator -r -p [] -c [] still shows the message: Please could you help me? Kind regards, |
DS-3914: Fix community defiliation
This is an alternative for #2063 without changing the
CommunityService.removeSubcommunity()
method.This fixes in issue in the defiliate method of the community filiator. The
child and parent relations should be managed using the provided methods of the
Community.
This changes the visibility of
Community.removeSubCommunity()
to public, butCommunity.removeParentCommunity()
was public before already. So this shouldnot be a problem.
The second commit is just a bit cleanup of manual loops.