Adding copy locations in staff client allows empty name field

Bug #1368754 reported by rsoulliere on 2014-09-12
This bug affects 7 people
Affects Status Importance Assigned to Milestone

Bug Description

EG: 2.5.5
OS: Ubuntu 12.04
Postgtresql: 9.1

When adding or editing copy locations in the staff client, a user is able to leave the name field blank. This seems to cause havoc on Circulation Policies since the id of the blank copy location will populate the copy_location limiter in the circulation policy if that limiter is left blank.

To verify do the following:

1. Create or edit a copy location and leave the name field blank.
2. Go to Circulation Policies Editor and create a new circ policy or edit an existing one leaving the copy_location on the default blank option.
3. Run an SQL query on the config.circ_matrix_matchpoint table to select the policy you have created. Examine the copy_location field. It should have the id of the empty copy location.

Should there be a data check to prevent Copy Locations with empty names from being added to the table?


Should the Circ Policies editor have an if statement to default to NULL if left on blank default option before searching for a match in the copy locations table based on name selected?

Chris Sharp (chrissharp123) wrote :

Behavior is confirmed in current master.

Changed in evergreen:
status: New → Confirmed
Michele Morgan (mmorgan) wrote :

Ran into this issue again on our 2.6 system when checkouts were getting incorrect loan periods and fines. Below is a database query which identifies rows in the circulation matrix that specify copy locations with blank names.

select mp.* from config.circ_matrix_matchpoint mp
join asset.copy_location loc on mp.copy_location =
where = ''

To respond to proposed strategies for fixing this, I would be in favor of the Circ Policies editor defaulting to NULL if no copy location is explicitly chosen.

It would also be good to address the issue of adding copy locations with blank names in some manner. A warning to users that they are about to create a location without a name would be useful. Another possibility would be changing the "Create a new copy location" label on the button in the Copy Locations Editor. Users add and edit copy locations infrequently and many intuit that the "Create a new copy location" button will bring up a form to fill in, rather than save information that has been entered into the form that's already on the screen.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers