[Koha-bugs] [Bug 9780] Deleting a record suppress bibliographic info in orders using that record

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 11 01:12:49 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9780

--- Comment #1 from mathieu saby <mathieu.saby at univ-rennes2.fr> ---
Created attachment 16008
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16008&action=edit
[PATCH] Bug 9780: Alert librarians if a record is used by orders and prevent
its suppression

Before this patch, librarians can delete a record even if it is used in an
order.
And if items are not created when ordering, librarians cannot know the record
is used in orders.

This patch adds one sub in Acquisiton.pm : GetOrdersByBiblionumber
It makes changes to detail.pl and detail.tt :
If the record is used by an active order, or a deleted order, Koha will display
a warning at the end
of the record, with the number of active order and deleted orders using the
record, and the
corresponding basket number.
If the librarian have managing order permission, the basket numbers are
clickable.

It also make changes to cat-toolbar.inc :
It adds 2 new controls when deleting a record :
- librarians cannot suppress it if it is used in an active order
- only librarians with managing order permission can suppress it if it is used
in a deleted order

To test :
1) in basket A, create 2 orders with a single record (with no items attached)
2) in basket B, create 1 order with the same record
3) check that record in catalog (detail.pl page) : you should see a line saying
it is used 3 times, in baskets A and B
4) in basket A, suppress one of the order
5) check the catalog again
6) try to suppress the record : it should be impossible
7) suppress the 2 other orders in basket A and B
8) check catalogue : you should see a line saying it is only used in 3 deleted
orders
9) try to delete again the record : it should be possible after a confirmation,
if you have order managing rights

M. Saby
Rennes 2 university

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list