Bug 3722

Summary: Branch deletion results in incorrect message
Product: Koha Reporter: Owen Leonard <oleonard>
Component: System AdministrationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: gmcharlt, nahuel.angelinetti
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed fix

Description Chris Cormack 2010-05-21 01:14:13 UTC


---- Reported by oleonard@myacpl.org 2009-10-20 19:55:12 ----

Steps to reproduce:

1. Create a new branch
2. Edit an item and set the holding/home branches to that branch
3. Try to delete the branch.

The message you see will be "Library cannot be deleted because there are patrons using that library."

On the other hand, Koha will happily delete a branch which has patrons attached to it.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:14 UTC  ---

This bug was previously known as _bug_ 3722 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3722

Actual time not defined. Setting to 0.0

Comment 1 Owen Leonard 2010-06-03 17:33:07 UTC
*** Bug 3802 has been marked as a duplicate of this bug. ***
Comment 2 Owen Leonard 2010-06-03 17:38:47 UTC
Created attachment 2212 [details] [review]
Proposed fix

A fix was submitted by Nahuel on 23 Nov 2009 and pushed, but it combined messages for existing patrons and existing items. This patch defines separate messages for the various cases and corrects a typo in the original fix which left existing patrons unreported.
Comment 3 Galen Charlton 2010-06-04 00:50:28 UTC
Pushed follow-up patch.  Please test and close.
Comment 4 Owen Leonard 2010-06-04 15:47:46 UTC
The script now correctly warns you with a specific message if you have
- Patrons registered at that branch
- Items held at that branch
- Patrons and items using that branch