Bug 4849

Summary: Cannot delete records from Labeled MARC view
Product: Koha Reporter: Jared Camins <camins>
Component: CatalogingAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: koha.sekjal
Version: rel_3_2   
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 Jared Camins 2010-06-03 18:14:45 UTC
Records with no items cannot be deleted from the Labeled MARC view. The error message that comes up says "There are [ 1 ] item(s) attached to this record / You must delete all items before deleting this record." Trying to delete the same record from the Normal view works fine. This may be related to bug 2310 (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=2310 )
Comment 1 Owen Leonard 2010-08-25 18:38:09 UTC
Created attachment 2572 [details] [review]
Proposed fix

The template checks for a "count" variable (item count) to see whether it should allow deletion of the biblio record. For some reason labeledMARCdetail.pl hard-coded this as 1, which meant the template always thought was 1 item.
    
This patch also adds an item count check on the display of "Delete all items," disabling it if there are no items.
Comment 2 Jared Camins 2010-11-01 15:32:25 UTC
Fixed as of 3.2-RC.