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

ANW-1843: add toggle to exclude <unitid> containing ASpace URI from EAD #3188

Closed
wants to merge 4 commits into from

Conversation

avatar382
Copy link
Collaborator

Description

add toggle to exclude containing ASpace URI from EAD

Related JIRA Ticket or GitHub Issue

https://archivesspace.atlassian.net/browse/ANW-1843

How Has This Been Tested?

manual and unit testing

Screenshots (if appropriate):

Screenshot_20240425_104511

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have read the CONTRIBUTING document.
  • I have authority to submit this code.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@avatar382 avatar382 marked this pull request as draft April 25, 2024 16:46
@avatar382 avatar382 marked this pull request as ready for review April 25, 2024 16:58
current default is to not pass any options including this newly added
one, which is breaking the OAI unit tests
@@ -209,9 +209,11 @@ def archival_object(index)

as_test_user("admin", true) do
load_export_fixtures
@doc = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource.id}.xml?include_unpublished=true&include_daos=true&ead3=true")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep a test that checks that the default behavior (the one that is currently happening on master) also continues to happen on these changes if no include_uri_unitids parameter is present in the request.

@@ -1377,7 +1383,7 @@ def description_content(obj)
describe "Test unpublished record EAD exports" do

def get_xml_doc(include_unpublished = false)
doc_for_unpublished_resource = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@unpublished_resource_jsonmodel.id}.xml?include_unpublished=#{include_unpublished}&include_daos=true&ead3=true", true)
doc_for_unpublished_resource = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@unpublished_resource_jsonmodel.id}.xml?include_unpublished=#{include_unpublished}&include_daos=true&include_uri_unitids=true&ead3=true", true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here, we should ensure that the default behavior happens if no include_uri_unitids param is given.

@@ -1483,7 +1489,7 @@ def get_xml_doc(include_unpublished = false)
def get_xml_doc
as_test_user("admin") do
DB.open(true) do
doc_for_resource = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource_jsonmodel.id}.xml?include_unpublished=true&include_daos=true", true)
doc_for_resource = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource_jsonmodel.id}.xml?include_unpublished=true&include_daos=true&include_uri_unitids=true", true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above. We should check that the default behavior is happening both

  • if include_uri_uinitids=true is present
  • and if no include_uri_unitids param is present

@@ -1579,7 +1585,7 @@ def get_xml_doc
def get_xml_doc
as_test_user("admin") do
DB.open(true) do
doc_for_resource = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource.id}.xml?include_unpublished=true&include_daos=true&ead3=true", true)
doc_for_resource = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource.id}.xml?include_unpublished=true&include_daos=true&include_uri_unitids=true&ead3=true", true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above. We should check that the default behavior is happening both

  • if include_uri_uinitids=true is present
  • and if no include_uri_unitids param is present

@doc_unpub = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource.id}.xml?include_daos=true")
@doc = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource.id}.xml?include_unpublished=true&include_daos=true&include_uri_unitids=true")
@doc_unpub = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource.id}.xml?include_daos=true&include_uri_unitids=true")
@doc_no_uri = get_xml("/repositories/#{$repo_id}/resource_descriptions/#{@resource.id}.xml?include_daos=true&include_uri_unitids=false")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment. We should also add the case when no include_uri_unitids param is present

@thimios thimios marked this pull request as draft May 29, 2024 13:43
@cdibella cdibella modified the milestone: 3.5.1 Jun 5, 2024
@thimios
Copy link
Collaborator

thimios commented Jun 6, 2024

Implemented here: #3228

@thimios thimios closed this Jun 6, 2024
@thimios thimios deleted the ANW-1843 branch June 6, 2024 20:34
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.

None yet

3 participants