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

members.delete should return values consistent with Array and Hash #103

Closed
elrayle opened this issue May 18, 2015 · 3 comments
Closed

members.delete should return values consistent with Array and Hash #103

elrayle opened this issue May 18, 2015 · 3 comments
Labels

Comments

@elrayle
Copy link
Contributor

elrayle commented May 18, 2015

It is expected that members.delete and related_objects.delete will return...

  • return child_collection/object when successful delete
  • return nil if child_collection/object does not exist in parent_collection/object
  • raise error for any other problems

See related issue samvera-deprecated/activefedora-aggregation#34.

Workaround to provide this behavior is in the hydra:pcdm remove services. They will need to be updated once the ActiveFedora issue is fixed.

Effected classes:

  • RemoveCollectionFromCollection
  • RemoveObjectFromCollection
  • RemoveRelatedObjectFromCollection
  • RemoveObjectFromObject
  • RemoveRelatedObjectFromObject

Tested by:

  • services/collection/remove_collection.rb -- context 'when collection is missing'
  • services/collection/remove_object.rb -- context 'when object is missing'
  • services/collection/remove_related_object.rb -- context 'when related object is missing'
  • services/object/remove_object.rb -- context 'when object is missing'
  • services/object/remove_related_object.rb -- context 'when related object is missing'

NOTE: These tests pass now because of the workaround in each of the Remove services.

@elrayle
Copy link
Contributor Author

elrayle commented May 18, 2015

See related issue samvera-deprecated/activefedora-aggregation#35

@elrayle elrayle added this to the May Hydra PCDM milestone May 18, 2015
@elrayle elrayle added the bug label May 18, 2015
@mjgiarlo mjgiarlo added the pcdm label Jul 9, 2015
@mjgiarlo mjgiarlo modified the milestones: May Hydra PCDM, summer-2015 Jul 9, 2015
@mjgiarlo mjgiarlo removed this from the summer-2015 milestone Jul 13, 2015
@elrayle
Copy link
Contributor Author

elrayle commented Jul 16, 2015

The source of the issue samvera-deprecated/activefedora-aggregation#35 at some point started working and has been closed. The kludge for the service objects can be removed.

@jrgriffiniii
Copy link
Contributor

Closing this due to the age of the issue (I am sorry, please let me know should this be reopened).

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

3 participants