Adding copy locations in staff client allows empty name field

Bug #1368754 reported by rsoulliere
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Low
Unassigned

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?

Or

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?

Revision history for this message
Chris Sharp (chrissharp123) wrote :

Behavior is confirmed in current master.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
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 = loc.id
where loc.name = ''

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.

Revision history for this message
Terran McCanna (tmccanna) wrote :

This has been resolved with the Angularized version of this interface - I can no longer create a shelving location without a name.

Changed in evergreen:
status: Confirmed → Won't Fix
Revision history for this message
Terran McCanna (tmccanna) wrote :

Actually, I take that back - I cannot create a shelving location that is empty, but I can create one with just a space for a title, which seems problematic as well. Reopening pending other feedback.

Changed in evergreen:
status: Won't Fix → Confirmed
importance: Undecided → Low
tags: added: admin-pages cataloging
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

I think this has been resolved in 3.8. If I put just a space in the Name field it turns red and the Save button is deactivated. The red disappears and the Save button is re-activated once I add a letter/number

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.