http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11438
--- Comment #1 from mathieu saby <[email protected]> --- Created attachment 23797 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23797&action=edit [PATCH] Bug 11438 - Add creation date and closing date to basketgroups This patch change the way Koha is dealing with closing basketgroups, taking as a model the way it deals with closing baskets. This improvement will serve as a base for further enh: - displaying the closing date in PDF instead of current date (this can be syspref-dependant) - usign the closing date for calculation of late orders, instead of closing date of the basket (this can be syspref-dependant) The patch provides 3 changes in in aqbasketgroups table structure: - The closing date is stored in bg_closedate column - The creation date is stored in bg_creationdate column - The closed column is removed When a basketgroup is open, or reopened, the closing date is set to NULL. I add a "bg_" prefix in column names to avoid all possible confusion between them and closedate/creationdate column in aqbaskets. Some changes are made to subs dealing with basketgroups in C4/Acquisition.pm. The 2 dates are displayed in basketgroup template - in lists of opened/closed basketgroups - in an individual basketgroup. Updatedatabase create the 2 columns and remove closed column, but also populates the 2 new columns: - bg_creationdate with the most recent closing date of the baskets included in each basketgroup - bg_closingdate with NULL is the bg is open, or with the most recent closing date of the baskets included in each basketgroup To test: (bg = basketgroup) 1. Before applying the patch, prepare some bgs : at least 1 open with 1 basket, 1 open with 2 baskets closed on different dates, 1 closed with 1 basket, 1 closed with 2 baskets closed on different dates 2. Apply the patch and run updatedatabase.pl 3. Show the list of open and closed bg and check the creation dates are correct (it should be the most recent closing date of the baskets included in each basketgroup) 4. Check the open bg have no closing date 5. Check the closed bg have a closing date, which must be the same as the creation date 6. Click on "View" to display an individual closed bg : check you the same dates as in the list of bgs 7. Reopen the closed bg. Check it is actually reopened and displayed in "open" tab, with no value in "closing date" column 8. Click on "Edit" to edit an individual open bg : check you the same creation date as in the list of bgs, and no closing date 9. Make some changes to this bg, and Save it without closing it 10. Check the changes were actually saved, and that the bg is still in "Open" tab, with no value in "closing date column" 11. Edit again the bg 12. Make some changes, but this time, check "Close basket group" box at the bottom of the form before Saving it 13. Check the changes were actually saved, and that the bg is now in "Closed" tab, with the today date in "closing date" column 14. Click on "New basketgroup" to create a new bg 15. Check no date at all is displayed in the creation form. 16. Give it a name, and Save it without closing it 17. Check the bg has been created, and is displayed in "Open" tab, with today date in "creation date" column, and no value in "closing date" 18. Click on "New basketgroup" to create an other new bg 19. Give it a name, but this time, check "Close basket group" box at the bottom of the form before Saving it 20. Check the bg has been created, and is displayed in "Open" tab, with today date in "creation date" column, and no value in "closing date" 23. In basket pages, Close an open basket, and ask to create a new bg with the same name 24. Check in bg page that a new closed bg with the same name as the closed basket has been created 25. In basket pages, Close basket without creating a bg, then put this basket in an open bg, using the "change group" dropdown menu 26. Check in bg page that the basket is now included in the bg -- 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/
