Comment 3 for bug 1805663

Revision history for this message
Jason Stephenson (jstephenson) wrote :

It's possible to add copies to bibs on sources with the can_have_copies flag set to false in the following ways:

1. Directly in the database via SQL inserts.
2. Via acquisitions if acq picks a bib on one of these sources.
3. Via Vandelay, if we're matching bibs on import.
4. Directly via the web staff client.

This raises the question of at what level do we want to add the protection against adding copies and volumes to these bibs? Adding a trigger in the database would be the most comprehensive protection, but the other subsystems will need to deal with it. Barring the addition of a trigger in the database, that leaves #1 still possible, but that is also the least likely way for copies to be created. However, that still leaves the other subsystems requiring modifications to honor the can_have_copies flag on the bib source. This could go in two directions. Each subsystem could be modified separately to handle the can_have_copies flag, or a common bit of code could be added to the back end that prevents the addition, i.e. throwing an error, and then each subsystem is modified separately to handle it.

Beyond the question of where to implement the check, there is also the question of user interface. That is, how is the user going to be presented with the notice of failure to create the copies, and how is the user going to be able to recover from that failure?