k-int / gokb-phase1

Original GOKb repo - Moving to https://github.com/openlibraryenvironment/gokb
http://www.gokb.org
Other
11 stars 5 forks source link

Prevent creation of duplicate packages #168

Open kristenwilson opened 9 years ago

kristenwilson commented 9 years ago

Is there anyway to prevent the creation of duplicate packages? Currently, in Refine, it's possible to use the package look up tool to create a new package with the exact same name as an existing one. It will be assigned a new identifier and the Refine project used to populate a new package in the CRED. If a user tries to do this, they should get an error message saying there is already a package with the same name and possibly asking if they would like to choose that package instead. Similarly, users should not be able to create a duplicate package name manually in the CRED.

ostephens commented 9 years ago

Can you say a bit more about how it's possible to create a new package with the same name as an existing one? What leads to this happening rather than using the existing name?

kristenwilson commented 9 years ago

Here are a couple screenshots to illustrate.

  1. I type of the name of an existing package. It matches the existing package, but still gives me the option to create new.
  2. I choose create new and I get the dialogue box to create the new package with a duplicate name. If I click OK, it will allow me to proceed and a new collection will be created.

This would mostly likely happen because of human error/carelessness. It's also a bit hard to tell if your package has a match because the text box is too narrow and you can't see the whole of what you typed. I'm thinking that if someone types in a package name that matches an existing one exactly, the create new button should become inactive so they can't make a duplicate. This hasn't actually happened yet in testing, but it was a concern that came up. I agree that it would make sense to prevent this from the start. It's probably not an essential fix for 4.0, but something to address in a future update.

duplicate-collection-1 duplicate-collection-2