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

COAR NotifyService IT failures: NotifyServiceInboundPatternsRemoveOpe… #451

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

frabacche
Copy link

Bug issue at DSpace github

All NotifyServiceInboundPatternsRemove*IT classes has the supports() method: returning true, the class is used to manage the incoming patch request. This boolean is calculated by matching the path sting to the string /notifyServiceInboundPatterns . This path is used as the initial part of many NotifyServiceInboundPattern*Operation classes.

org.dspace.app.rest.repository.patch.operation.ldn.NotifyServiceInboundPatternsRemoveOperation
is the backend service to delete all the inboundPatterns of a given notifyServiceEntity. It's supports() method is evaluated as true even if the http patch call had the path /notifyServiceInboundPatterns[1]/constraint - and it is wrong because the correct backend to be triggered should be org.dspace.app.rest.repository.patch.operation.ldn.NotifyServiceInboundPatternConstraintRemoveOperation

That said - the solution is to add the condition
&& path.endsWith(OPERATION_PATH)
to the supports() method return condition on NotifyServiceInboundPatternsRemoveOperation class.

…ration supports modification to match an exact path
@4science-it 4science-it merged commit 3ea0022 into main Apr 22, 2024
14 of 16 checks passed
@4science-it 4science-it deleted the coar-notify-NotifyServiceRestRepositoryIT-fix branch April 22, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants