http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9780
mathieu saby <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16233|0 |1 is obsolete| | --- Comment #12 from mathieu saby <[email protected]> --- Created attachment 16305 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16305&action=edit [PATCH][Revised] Bug 9780: Show if a record is used by orders and prevent its suppression Revised : suppressing tabs, adding 5) and 18) step in test 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 : A. test what can do and see a librarian with order managing rights 0) Connect to Koha with a borrower with order managing rights 1) check XSLTDetailsDisplay syspref is disabled 2) in basket A, create 2 orders with a single record 3) in basket B, create 1 order with the same record 4) check that record in catalog (detail.pl page) : you should see a line saying it is used 3 times, in baskets A and B 5) if some items are attached to that record, suppress all items 6) in basket A, suppress one of the 2 orders 7) check the record again : you should see a line saying it is used 2 times in active orders, in baskets A and B, and 1 time in suppressed order in basket A 8) enable XSLTDetailsDisplay syspref 9) check the record again : you should see the same information as 5. 10) each basket number must be a hyperlink. Check if the links are correct 11) try to suppress the record : it should be impossible 12) suppress the 2 other orders in basket A and B 13) check catalogue : you should see a line saying it is only used in 3 deleted orders 14) try to delete again the record : it should be possible after a confirmation B. test what can do and see a librarian without order managing rights 15) in basket A, create again 1 order with a single record 16) disconnect yourself and connect to Koha with a borrower without order managing rights 17) check the record in the catalog : you should see information, but without any link to basket A 18) if some items are attached to that record, suppress all items 19) try to suppress the record : it should be impossible (like before) 20) disconnect yourself and connect to Koha with a borrower with order managing rights 21) suppress the order in basket A 22) disconnect yourself and connect to Koha with a borrower without order managing rights 23) check the record again : you should see a line saying it is only used in a deleted order in basket A 24) try to delete the record : it should be impossible, because you don't have order managing rights Signed-off-by: Julian Maurice <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
