We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Convert GrantEditToMembersJob to allow it to receive either an ActiveFedora based FileSet or a Valkyrie::Resource equivalent Work.
Allow jobs to execute correctly with existing AF implementation or the wings Valkyrie implementation.
GrantEditToMembersJob receives a Valkyrie::Resource and performs GrantEditJob for each member FileSet.
To get the list of FileSet ids from a work resource, use...
file_set_ids = Hyrax.query_service.custom_queries.find_child_fileset_ids(resource: work_resource)
Coordinate with Issue #4104 to pass use_valkyrie: true when a Valkyrie::Resource was received and false if not.
use_valkyrie: true
GrantEditToMembersJob raises an exception (perhaps: NoMethodFound for #search_with_conditions) when passed a Valkyrie::Resource.
See Pattern for Jobs Receiving Parameter that may be an AF Object or a Valkyrie Resource
See example of processing both objects in... file_set_actor_spec.rb
For testing this job, you can use something like...
RSpec.describe GrantEditToMembersJob do [true, false].each do |test_valkyrie| context "when test_valkyrie is #{test_valkyrie}" do let(:af_work) { create(:work) } let(:valk_file_set) { af_work.valkyrie_resource } let(:work) { test_valkyrie ? valk_file_set : af_work }
The text was updated successfully, but these errors were encountered:
Fixed by PR #4123
Sorry, something went wrong.
elrayle
bkeese
No branches or pull requests
Descriptive summary
Convert GrantEditToMembersJob to allow it to receive either an ActiveFedora based FileSet or a Valkyrie::Resource equivalent Work.
Rationale
Allow jobs to execute correctly with existing AF implementation or the wings Valkyrie implementation.
Expected behavior
GrantEditToMembersJob receives a Valkyrie::Resource and performs GrantEditJob for each member FileSet.
To get the list of FileSet ids from a work resource, use...
Coordinate with Issue #4104 to pass
use_valkyrie: true
when a Valkyrie::Resource was received and false if not.Actual behavior
GrantEditToMembersJob raises an exception (perhaps: NoMethodFound for #search_with_conditions) when passed a Valkyrie::Resource.
Approach for Conversion
See Pattern for Jobs Receiving Parameter that may be an AF Object or a Valkyrie Resource
Steps to reproduce the behavior
See example of processing both objects in... file_set_actor_spec.rb
For testing this job, you can use something like...
Related work
The text was updated successfully, but these errors were encountered: