code cleaning of circulation
Hi, hdl & me start cleaning circulation module. The goal will be to have : - C4/Circulation.pm => to deal with issues, returns, transfers - C4/Overdues.pm => to deal with overdues and fines - C4/Reserves.pm => to deal with Reserves thus : - C4/Circulation/ will disappear - most subs will be renamed - some subs will be moved from a package to another - some subs will be dropped (merged into another one) comments welcomed ;-) -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org) Tel : 04 91 31 45 19
Paul POULAIN <paul.poulain@free.fr> wrote:
comments welcomed ;-)
Will there be greater use of object-orientation? Regards, -- MJ Ray - see/vidu http://mjr.towers.org.uk/email.html Webmaster/web developer, statistician, sysadmin, online shop maker, developer of koha, debian, gobo, gnustep, various mail and web s/w. Workers co-op @ Weston-super-Mare, Somerset http://www.ttllp.co.uk/
paul and hdl++ -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS ----- "Paul POULAIN" <paul.poulain@free.fr> wrote:
Hi,
hdl & me start cleaning circulation module. The goal will be to have : - C4/Circulation.pm => to deal with issues, returns, transfers - C4/Overdues.pm => to deal with overdues and fines - C4/Reserves.pm => to deal with Reserves
thus : - C4/Circulation/ will disappear - most subs will be renamed - some subs will be moved from a package to another - some subs will be dropped (merged into another one)
comments welcomed ;-) -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org) Tel : 04 91 31 45 19
_______________________________________________ Koha-devel mailing list Koha-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/koha-devel
OK, i've commited a HUGE rewritte of circulation. WARNING : it's partially tested, so feel free to test & report problems. At least, I could do issues & returns. I haven't got a chance to check transfers & only partially tested reserves. I'll do on friday (tomorrow I can't) However : there ARE bugs, otherwise i'm not a human, and afaik, i'm one ;-) Note that NOTHING should change in Koha behaviour. It's purely internal improvements. Here are the notes I've written while doing my modifs. Some errors may occur & some modif may have been forgotten, I apologize if you find some diffs. * moved getpatroninformation to Members.pm, renamed to GetPatronDetails and fixed API (removed $env as 1st parameter) * canbookbeissued renamed to CanBookBeIssued * currenissued renamed to GetCurrentIssues * getissues dropped (use GetCurrentIssues instead) * renewstatus renamed to CanBookBeRenewed and API fixed (removed $dbh and $env) * issuebook renamed to AddIssue * renewbook renamed to AddRenewal and API fixed (removed $dbh) * calc_charge renamed to GetIssuingCharge & API fixed (removed $env as 1st parameter) * createcharge renamed to AddIssuingCharge and API fixed (removed $env & $dbh * removed find_reserve (useless) * removed fixaccountforlostandreturned : it was used just once, and I think/fear it was highly boggus. It was supposed to update fines when a book marked lost was returned, but it seems it supposed some HLT specific parameters. My opinion is that it's better just to point the fact (that a returned book was marked lost), and let the librarian deal manually with the fine part (the behaviour depending on the library) * getiteminformation update to contain current borrower * getcurrentborrower removed (it's now in getiteminformation) * checkreserve_to_delete removed (unused) * getcurrentissues renamed to GetBorrowerIssues and improve Perl * GetIssuesFromBiblio renamed to GetBiblioIssues * get_current_return_date_of removed * GetItemIssues added : returns the list of issues for a given item (Note : It's not called GetIssues, as it could be confusing with serial issues) * GetItemIssue added : returns the current issue information if a book is issued (Note : It's not called GetIssue, as it could be confusing with serial issues) * get_transfert_infos renamed to GetTransfers * GetTransfersFromBib renamed to GetTRansfersFromTo * GetReservesForBranch and GetReservesToBranch moved to Reserves.pm * CheckItemNotify GetOverduesForBranch RemoveNotifyLine and AddNotifyLine moved to Overdues.pm * checktransferts removed (duplicate of GetTransfers) * GetLostItems moved to Biblio.pm * decode : question for Chris : what is decode really doing ? It's called by circulation.pl/cuecatbarcodedecode, and I really don't see what those 2 subs does. If you can explain... * itemseen moved to Biblio.pm and renamed to ModDateLastSeen * removed itemborrowed (used only once, can be merged with another query 3 lines before) * created GetItem in Biblio.pm. Replaced many getiteminformation by GetItem (those who just need item details, and nothing about circulation) * replaced some getiteminformation by GetBiblioFromItem & * AddIssue deeply rewritten : to create an issue, we mainly get a borrowernumber and a barcode. We read item information with GetItem, we need some biblio-level informations, read with GetBiblioFromItemNumber, and we read previous issues with GetIssue TODO : - remove getnextacctno, and replace it by an auto_increment field (the code is dirty & dangerous) - some $env in API still to remove - AddReturn returns useless informations - Rename Reserves2.pm to Reserves.pm - debug Overdues.pm & Reserves.pm - change some sub name (...Detail for example) & checking for some subs being 2 for the same goal be happy or upset, depending on how many things i've broken ;-) -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org) Tel : 04 91 31 45 19
Paul POULAIN wrote:
(snipped) * removed fixaccountforlostandreturned : it was used just once, and I think/fear it was highly boggus. It was supposed to update fines when a book marked lost was returned, but it seems it supposed some HLT specific parameters. My opinion is that it's better just to point the fact (that a returned book was marked lost), and let the librarian deal manually with the fine part (the behaviour depending on the library) It is not bogus, and it isn't broken. It doesn't update fines. It updates the charge for a book which is charged to a borrower who doesn't return it. The borrower pays this charge, so that he/she can go on borrowing, but later finds the book and wants a credit. This fixaccountforlostandreturned is very clever, because it credits the borrower's account with the same amount they paid for the cost of the book. And it's all beautifully automatic, so that the staff don't have to watch for it and deal with it manually. (this is the age of computers, not doing things manually that can be, and are being, done by computers.
Please don't "fix" this, Paul. It isn't broken. Chers Rosalie Blake Horowhenua Library Trust
On 5/04/2007, at 1:32 PM, Rosalie Blake wrote:
(snipped) * removed fixaccountforlostandreturned : it was used just once, and I think/fear it was highly boggus. It was supposed to update fines when a book marked lost was returned, but it seems it supposed some HLT specific parameters. My opinion is that it's better just to point the fact (that a returned book was marked lost), and let the librarian deal manually with the fine part (the behaviour depending on the library) It is not bogus, and it isn't broken. It doesn't update fines. It updates the charge for a book which is charged to a borrower who doesn't return it. The borrower pays this charge, so that he/she can go on borrowing, but later finds the book and wants a credit. This fixaccountforlostandreturned is very clever, because it credits the borrower's account with the same amount they paid for
Paul POULAIN wrote: the cost of the book. And it's all beautifully automatic, so that the staff don't have to watch for it and deal with it manually. (this is the age of computers, not doing things manually that can be, and are being, done by computers.
Hi Ill go through this code and comment it more fully, but yes it would be a real shame to lose this feature, its in use in at least 3 libraries that I know about. Chris -- Chris Cormack chris.cormack@liblime.com VP Research and Development www.liblime.com LibLime +64 21 542 131
I've continued to work on Circulation cleaning. Here is a list of tests that works atm : * issue book : OK * renew issue from circulation.pl page: OK * renew issue from moremember.pl page : OK * return book : OK * return book : enter unknown barcode: OK * issue book BookA (branch A) to Borr1 (branch A), login as librarian from branch B, reserve book for Borr2 (branch B), delete reserve : OK * Transfering an issued book : - issue book BookA (branch A) to Borr1 (branch A), => OK - login as librarian from branch B, - reserve book for Borr2 (branch B), =>OK - delete reserve, => OK -re-enter reserve again - login as librarian from branch A, - return bookA and confirm transfer to branch B => OK - login as librarian from branch B - check in transfers to recieve that transfer is on the way. => OK - do a return as branch B to validate the transfer => OK * branchreserve.pl (pending reserves for books at a given branch) - cancel a reserve of a book from this branch => OK - cancel a reserve at branch A of a book owned by branch B => OK, (the transfer appears if you look at transfers to recieve at branch B) * Transfers to do (waitingreservestransfers.pl => OK * Transfers to recieve (currenttransferst.pl) => OK * Pending reserves (to pick up in the shelves, reserve.pl) => OK * Reserves waiting for patron pick-up (branchreserves.pl) => OK * overdues (overdues.pl) => OK, see below * overdues by branch (branchoverdues.pl) => OK, see below * (branchtransfer.pl) transfering manually a book => partially. Seems not to work with reserves, but works for "standard" situation, for books issued (=automatic return) TODO : - merge overdues and branchoverdues.pl - remove department in branchoverdues.pl - fix branchtransfer for reserved items - reintroduce fixaccountforlostandreturned as requested by rosalie - remove getnextacctno, and replace it by an auto_increment field (the code is dirty & dangerous) - some $env in API still to remove (updateStats calls mainly) - AddReturn returns useless informations - Rename Reserves2.pm to Reserves.pm - change some sub name & checking for some subs being 2 for the same goal - change some script names (waitingreservestransfers.pl, currenttransferst.pl, branchreserves.pl) to something more readable. I hope to work on this tomorrow Cheers. -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org) Tel : 04 91 31 45 19
Paul POULAIN a écrit :
I've continued to work on Circulation cleaning. - merge overdues and branchoverdues.pl
DONE
- remove department in branchoverdues.pl
DONE
- some $env in API still to remove (updateStats calls mainly)
DONE (everywhere, a huge stuff... partially tested, so excuse any error) still to do :
- fix branchtransfer for reserved items - reintroduce fixaccountforlostandreturned as requested by rosalie - remove getnextacctno, and replace it by an auto_increment field (the code is dirty & dangerous) - AddReturn returns useless informations - Rename Reserves2.pm to Reserves.pm - change some sub name & checking for some subs being 2 for the same goal - change some script names (waitingreservestransfers.pl, currenttransferst.pl, branchreserves.pl) to something more readable.
I hope to work on this tomorrow
I won't work on this anymore this week i'm afraid... -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org) Tel : 04 91 31 45 19
Paul POULAIN a écrit :
Paul POULAIN a écrit :
I've continued to work on Circulation cleaning. still to do : - fix branchtransfer for reserved items - reintroduce fixaccountforlostandreturned as requested by rosalie
DONE
- remove getnextacctno, and replace it by an auto_increment field (the code is dirty & dangerous)
WON'T DO : the Accounts management should be cleaned & I'm not friendly enough with the tables that I don't want to start that. someone (chris w should investigate that better than I could.
- AddReturn returns useless informations
WON'T DO : no, AddReturn don't return anything useless. Even if I agree it returns probably too many things, it works & is efficient, so I won't change.
- Rename Reserves2.pm to Reserves.pm
DONE
- change some sub name & checking for some subs being 2 for the same goal
DONE
- change some script names (waitingreservestransfers.pl, currenttransferst.pl, branchreserves.pl) to something more readable.
DONE : renamed to transferstodo / transferstoreceive / pendingreserves / waitingreserves -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org) Tel : 04 91 31 45 19
Hi What issues in reserves are there as I have already cleaned up alot of them on our system and may have already cleaned up some. Or I may be able to help clean up others. Cheers Jack Penman On 3/31/07, Paul POULAIN <paul.poulain@free.fr> wrote:
Hi,
hdl & me start cleaning circulation module. The goal will be to have : - C4/Circulation.pm => to deal with issues, returns, transfers - C4/Overdues.pm => to deal with overdues and fines - C4/Reserves.pm => to deal with Reserves
thus : - C4/Circulation/ will disappear - most subs will be renamed - some subs will be moved from a package to another - some subs will be dropped (merged into another one)
comments welcomed ;-) -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org) Tel : 04 91 31 45 19
_______________________________________________ Koha-devel mailing list Koha-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/koha-devel
participants (6)
-
Chris Cormack -
Jack Penman -
Joshua M. Ferraro -
MJ Ray -
Paul POULAIN -
Rosalie Blake