Skip to content

ANW-2107 Allow owner repo to be imported via CSV#3275

Merged
thimios merged 2 commits intoarchivesspace:masterfrom
lorawoodford:add_owner_repo_on_loc_import
Oct 29, 2024
Merged

ANW-2107 Allow owner repo to be imported via CSV#3275
thimios merged 2 commits intoarchivesspace:masterfrom
lorawoodford:add_owner_repo_on_loc_import

Conversation

@lorawoodford
Copy link
Copy Markdown
Contributor

Adds a checkbox to the location CSV importer that allows for the imported location(s) to be linked to the current repo.

Description

Allows for locations to be imported with an associated repo from the start, rather than requiring additional steps after import.

Related JIRA Ticket or GitHub Issue

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

How Has This Been Tested?

Some tests added to the backend test suite, as well as manually testing. Happy to add additional tests based off the guidance/review of the dev team.

Screenshots (if appropriate):

Adds the following checkbox:

Screenshot 2024-08-08 at 5 09 33 PM

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.

@cdibella cdibella added the community code contributed by community members not on or contracted by the ArchivesSpace program team label Aug 26, 2024
@lorawoodford lorawoodford marked this pull request as ready for review September 9, 2024 14:50
Copy link
Copy Markdown
Collaborator

@thimios thimios left a comment

Choose a reason for hiding this comment

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

Looks good to me, some minor change requests added. @lorawoodford could you rebase this on current master and let the test suite run?

my_converter.instance_variable_set(:@import_options, {})
end

it 'creates location records with owner repo' do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"...without owner repo"

filenames = @json.job['filenames'] || []
import_maint_events = @json.job["import_events"] == "1" ? true : false
import_subjects = @json.job["import_subjects"] == "1" ? true : false
import_repository = @json.job["import_repository"] == "1" ? true : false
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

would be nice to align these lines on "="

import_repository = opts[:import_repository]

unless import_events == nil && import_subjects == nil
unless [import_events, import_subjects, import_repository].all?(&:nil?)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@lorawoodford lorawoodford force-pushed the add_owner_repo_on_loc_import branch from f5e0144 to af408f6 Compare October 28, 2024 21:17
@thimios thimios merged commit ef80081 into archivesspace:master Oct 29, 2024
thimios pushed a commit that referenced this pull request Nov 1, 2024
ANW-2107 allow owner repo to be imported via CSV when importing locations
@cdibella cdibella added this to the 4.0.0 milestone Nov 25, 2024
@lorawoodford lorawoodford deleted the add_owner_repo_on_loc_import branch April 2, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community code contributed by community members not on or contracted by the ArchivesSpace program team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants