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

Ensuring item import in order as defined in CSV #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mahnkong
Copy link

@mahnkong mahnkong commented Oct 14, 2022

We have at our end the requirement to import items inside a SAF in the same order as they where defined inside the CSV used to create the SAF.

DSpace sorts the entries inside the SAF alphanumerically while importing the SAF, so an item 11 would be imported after item 9 due to the corresponding item directory names:

item_1
item_10
item_11
item_2
item_3
item_4
item_5
item_6
item_7
item_8
item_9

This change uses a String formatter based on the amount of data records to create the SAF item directories, so the sort order fits the order inside the CSV:

item_01
item_02
item_03
item_04
item_05
item_06
item_07
item_08
item_09
item_10
item_11
item_12

…ZIP directories always with same character length using String formatter based on CSV record length
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.

1 participant