-
Notifications
You must be signed in to change notification settings - Fork 224
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
the MARC exporter seems to include unpublished resources regardless of parameter #2864
Comments
@regineheberlein It looks to me like the |
@quoideneuf In other words, what I'm looking for is a way to include with the export only resource records that are set to |
@regineheberlein When you say "we batch-export MARC records", does that mean that you have some locally-written code that fetches MARC records using the resource ids at the [:GET] /repositories/:repo_id/resources/marc21/:id.xml |
@quoideneuf Yes, we are using locally written code (here: https://github.com/pulibrary/aspace_helpers/blob/main/reports/aspace2alma/get_MARCxml.rb)
|
Hi Brian, just checking to see whether there's a timeline for this feature yet? |
When retrieving a MARC-XML representation of a resource record via API, records set to
"publish"=>false
are included by default. I can't override this behavior by adding theinclude_unpublished_marc=false
parameter, either (https://archivesspace.github.io/archivesspace/api/?python#get-a-marc-21-representation-of-a-resource).(I'm also wondering about the
include_marc
parameter (different parameter name than in the documentation above) in https://github.com/archivesspace/archivesspace/blob/master/backend/app/exporters/models/marc21.rb, but I can't get it to work, either.)There's every chance that this is due to a mistake on my end, but I'm beginning to suspect that it's a bug. Thanks for looking into it!
Expected Behavior
"publish"=>false
should not be included in the exportinclude_unpublished_marc=false
should exclude unpublished resource records from the exportCurrent Behavior
Currently, unpublished resource records are exported with my get requests against the MARC exporter endpoint, with or without parameter
Possible Solution
Steps to Reproduce (for bugs)
Any API get request against an unpublished resource record, e.g.
@client.get("/repositories/5/resources/marc21/4265.xml"
@client.get(uri, {query: { include_unpublished_marc: false }})
@client.get("/repositories/5/resources/marc21/4265.xml?include_unpublished_marc=false")
Context
This results in us exposing closed records in our catalog.
Your Environment
The text was updated successfully, but these errors were encountered: