[Koha-bugs] [Bug 10758] Show bibliographic information of deleted records in acquisitions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Apr 5 11:26:09 CEST 2014


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

mathieu saby <mathsabypro at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22106|0                           |1
        is obsolete|                            |

--- Comment #33 from mathieu saby <mathsabypro at gmail.com> ---
Created attachment 26830
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26830&action=edit
[PATCH 1/2] Bug 10758 - Show bibliographic information of deleted records in
acquisitions

No more dependancy

Fully testable, but a second patch will be provided for fixing and improving
the UTs
Aim of the patch : when a record is deleted but used in an order, display
information stored
in deletedbiblio and deletedbiblioitems tables on some pages of acquisition
module

Note that this patch will only have real effects for records deleted AFTER its
application.

Changes :
- modification of database structure : new column "deletedbiblionumber" in
aqorders
We keep the constraint between aqorders.biblionumber and biblio.biblionumber,
but we create a new one between
aqorders.deletedbiblionumber and deletedbiblio.biblionumber
With this system, we can make a JOIN between aqorders and
deleted(biblio/biblioitems) table, and retreive information.

- modification of GetOrder, GetOrders, GetCancelledOrders and SearchOrders in
C4::Acquisition :
Those subs are now also getting bibliographic information from deleted tables
deletedbiblio and deletedbiblioitems
Only usefull or potentially usefull fields are retreived (no more biblio.* and
biblioitems.*)
For each field, I used COALESCE in SQL query. Ex: COALESCE
(biblio.title,deletedbiblio.title) AS title

- modification of DelBiblio in C4::Biblio
Wen a record is deleted with DelBiblio, the sub checks if it used in an order
If so, the biblionumber is deleted from aqorders.biblionumber (as before), but
it is copied to aqorder.deletedbiblionumber

- modification of files in acqui : basket.pl, neworderempty.pl
To transmit the new key "deletedbiblionumber" to the templates

- modification of templates in intranet/module/acqui : basket.tt,
histsearch.tt, lateorders.tt, neworderempty.tt, parcel.tt

Test plan :
A. BEFORE applying the patch
- create a basket with at least 4 orders,using different records
- in the catalog, delete one of the record used by 1st order, whithout
cancelling the order (there will be an alert, but you can do that)
- return to the basket page (or refresh it) : the information about the record
is lost
- if you want, try to receive orders or to search orders : in those pages too
the information for this record will be lost

B. Apply the patch and run updatedatabase.pl

C. Go back to your basket and refresh it
- the information of the record deleted before the application of the patch is
still lost ("Can't find title")
- in the catalog, delete one of the record used by 2d order, whithout
cancelling the order
- return to the basket page (or refresh it) : the information about the record
is still visible, with the mention (Deleted record)
- Try to modify the 2d order : click on "Modifiy" on the right column of the
table
- you will get on neworderempty.pl, but with a message "(Deleted record, not
editable)".
You will be able to change accounting details but not bibliographic information
(In a future development, we could imagine to recreate a record and in order to
make the order editable even if the original record
is deleted, but it would be dangerous to do so now)
- in the basket, cancel the 3rd order AND the record (click on "Delete order
and record")
- in the "Cancelled orders", you still could see bibliographic information
about the cancelled order, with the mention "(Deleted record)"

D. Go on late orders page
- check you can see information about 2d order (which is linked with a deleted
record)

E. Go on order advanced search page
- fill the form with the title of 2d order and click on Search
- check Koha can retreive the order, and show correct information

F. Try to receive orders from the vendor used for your basket
- in the filters on the left of the page which displays the table of pending
orders, search the title of the 2d order
- Koha should retreive the 2d order
- you must have a mention "Deleted record, order cannot be received" above the
title
- you must not have a link "Receive" on the left of the table
(In a future development, we could imagine to recreate a record to do the
receipt, but it would be dangerous to do so now.
The best to do if a record was deleted and the order not yet received is
probably to cancel the order, and to recreate it by hand)

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


More information about the Koha-bugs mailing list