mjordan / persistent_identifiers

Drupal 8/9 Module that provides a generalized framework for minting and persisting persistent identifiers (DOIs, ARKs, etc.).
GNU General Public License v2.0
5 stars 11 forks source link

Add batch processing for persisting #23

Open Tristaan opened 3 years ago

Tristaan commented 3 years ago

Hello, As said in the issue #22, here is the batch processing. I solved it using an controller and a link in the form. It is working, but it needs some work done in the generic persister, because it does not overwrite existing values, it just adds new values. This is really impractical if doing batch processes multiple times. I did not know how to solve this.

Hope to hear from someone soon.

mjordan commented 3 years ago

@Tristaan thanks for this, I will take a look.

mjordan commented 3 years ago

When you say "it does not overwrite existing values, it just adds new values", are you wanting to overwrite all existing values in for example the "Identifier" field even if they are not persistent identifiers? For example, if I have in my Identifier field some local identifiers (e.g. "etdid3876"), if this node was part of a batch, that value would be wiped out and replaced with "ark:/4653/fooo499q"? If that's the case, we can do that in the persister, but we'll need to provide an option to either overwrite or append values, since not all sites will want to do that. Let me know if I have misunderstood what you're looking for.

Tristaan commented 3 years ago

Well why can't we have the best of both worlds? Overwrite (or don't write for that matter) if the same value exists in field_identifiers. Else append to the array.

On Fri, 17 Sep 2021, 16:08 Mark Jordan, @.***> wrote:

When you say "it does not overwrite existing values, it just adds new values", are you wanting to overwrite all existing values in for example the "Identifier" field even if they are not persistent identifiers? For example, if I have in my Identifier field some local identifiers (e.g. "etdid3876"), if this node was part of a batch, that value would be wiped out and replaced with "ark:/4653/fooo499q"? If that's the case, we can do that in the persister, but we'll need to provide an option to either overwrite or append values, since not all sites will want to do that. Let me know if I have misunderstood what you're looking for.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mjordan/persistent_identifiers/pull/23#issuecomment-921826460, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEPGMDKQKDLHCB5IZGDZY3UCNDVFANCNFSM5ECL3AGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mjordan commented 3 years ago

Gotcha. I'll comment on one way of doing that over in the code review.