Currently Koha does not allow to checkout several items at once to a user. This can cause a waste of time when a user want to checkout more than 10 items. This development has been asked to have statistics on in-house use. Every night, a librarian will enter a barcode list (from a file or a scanner : the librarian scans the barcode of the documents that users let on the tables). Barcodes will be added to a statistics patron in order to count the number of items consulted. The development has been expanded to cover another need: some special libraries (BDP for "Bibliothèque départementale de prêt": "Loan Regional Library"). These libraries loan items to smaller libraries (municipal). The number of items could be very important and the current way offered by Koha is not adequate.
Created attachment 25255 [details] [review] Bug 11759: Batch checkout - prepare the ground This patch does not introduce any changes. It prepares the circulation script to accept several barcodes in parameter. A loop is done on all barcodes (until now, only 1) to generate a structure to sent to the template. At the end, only the first generated data is sent.
Created attachment 25256 [details] [review] Bug 11759: Batch checkout - Add the new template This patch is the main patch. It adds: - the new template circ/circulation_batch_checkouts.tt - the change into circ/circulation.pl === Why this feature is useful for some libraries? === Currently Koha does not allow to checkout several items at once to a user. This can cause a waste of time when a user want to checkout more than 10 items. This development has been asked to have statistics on in-house use. Every night, a librarian will enter a barcode list (from a file or a scanner : the librarian scans the barcode of the documents that users let on the tables). Barcodes will be added to a statistics patron in order to count the number of items consulted. The development has been expanded to cover another need: some special libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional Library"). These libraries loan items to smaller libraries (municipal). The number of items could be very important and the current way offered by Koha is not adequate. === Test plan === 0/ Apply all patches and execute the DB change entry. 1/ Verify you are abble to do some checkouts (with confirmations, errors). = Statistics way = 2/ Create a statistical patron (e.g. category code STATS). 3/ Update the batch_checkouts pref with the category code (STATS). 4/ Go on the member page and verify the new "Batch check out" tab appears (and only for this user). 5/ Check some items out on the new page using the textarea or a file. 6/ Verify the table contains the item's information and the "Information" column contains "Local use recorded". = Real checkouts = 7/ Create a non statistical patron and update the pref. 8/ Check some items out on the new page using the textarea or a file. 9/ Verify the information in the table is consistent. 10/ Verify item without confirmation needed or impossible alert is checked out. 11/ If the logged in user has the "force_checkout" permission, all checkouts with a "confirmation needed" message can be done. If the logged in user does not have it, there is no way to force the checkout.
Created attachment 25257 [details] [review] Bug 11759: Add links to the new page
Created attachment 25258 [details] [review] Bug 11759: Add some css to highlight warnings and errors
Created attachment 25260 [details] [review] Bug 11759: Batch checkout - DB changes Add the new pref batch_checkouts in DB.
Note this development has not been tested and is not waiting to be signed off.
Created attachment 25620 [details] [review] Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc).
Created attachment 26442 [details] [review] Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc).
The last patch fixes an issue: all patron cards were expired.
Created attachment 26455 [details] [review] Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc).
I'm not certain about the utility of this patch... What happens if an item has a hold, can't be checked out to that patron, etc.?
(In reply to David Cook from comment #11) > I'm not certain about the utility of this patch... I tried to explain the goal of the patch in the description of this report. > What happens if an item has a hold, can't be checked out to that patron, > etc.? This patch catches errors/warnings using the same tests as the "normal" checkout.
$ git bz apply 11759 Bug 11759 - Batch checkout 25255 - Bug 11759: Batch checkout - prepare the ground 25256 - Bug 11759: Batch checkout - Add the new template 25257 - Bug 11759: Add links to the new page 25258 - Bug 11759: Add some css to highlight warnings and errors 25260 - Bug 11759: Batch checkout - DB changes 26455 - Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 11759: Batch checkout - prepare the ground Applying: Bug 11759: Batch checkout - Add the new template fatal: sha1 information is lacking or useless (circ/circulation.pl). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 11759: Batch checkout - Add the new template The copy of the patch that failed is found in: /home/magnus/scripts/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-11759-Batch-checkout---Add-the-new-template-tEAbBf.patch
Created attachment 26806 [details] [review] Bug 11759: Batch checkout - prepare the ground This patch does not introduce any changes. It prepares the circulation script to accept several barcodes in parameter. A loop is done on all barcodes (until now, only 1) to generate a structure to sent to the template. At the end, only the first generated data is sent.
Created attachment 26807 [details] [review] Bug 11759: Batch checkout - Add the new template This patch is the main patch. It adds: - the new template circ/circulation_batch_checkouts.tt - the change into circ/circulation.pl === Why this feature is useful for some libraries? === Currently Koha does not allow to checkout several items at once to a user. This can cause a waste of time when a user want to checkout more than 10 items. This development has been asked to have statistics on in-house use. Every night, a librarian will enter a barcode list (from a file or a scanner : the librarian scans the barcode of the documents that users let on the tables). Barcodes will be added to a statistics patron in order to count the number of items consulted. The development has been expanded to cover another need: some special libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional Library"). These libraries loan items to smaller libraries (municipal). The number of items could be very important and the current way offered by Koha is not adequate. === Test plan === 0/ Apply all patches and execute the DB change entry. 1/ Verify you are abble to do some checkouts (with confirmations, errors). = Statistics way = 2/ Create a statistical patron (e.g. category code STATS). 3/ Update the batch_checkouts pref with the category code (STATS). 4/ Go on the member page and verify the new "Batch check out" tab appears (and only for this user). 5/ Check some items out on the new page using the textarea or a file. 6/ Verify the table contains the item's information and the "Information" column contains "Local use recorded". = Real checkouts = 7/ Create a non statistical patron and update the pref. 8/ Check some items out on the new page using the textarea or a file. 9/ Verify the information in the table is consistent. 10/ Verify item without confirmation needed or impossible alert is checked out. 11/ If the logged in user has the "force_checkout" permission, all checkouts with a "confirmation needed" message can be done. If the logged in user does not have it, there is no way to force the checkout.
Created attachment 26808 [details] [review] Bug 11759: Add links to the new page
Created attachment 26809 [details] [review] Bug 11759: Add some css to highlight warnings and errors
Created attachment 26810 [details] [review] Bug 11759: Batch checkout - DB changes Add the new pref batch_checkouts in DB.
Created attachment 26811 [details] [review] Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc).
Created attachment 26813 [details] Message says "The hold will be canceled." Just a question: If I include an item with a (item level) hold in the batch, I get the attached message, which says: "This Item has been on hold for another patron. The hold will be canceled." But when I click on the "Checkout or renew" button, the hold is not actually cancelled, just overridden so the item can be issued to the current patron. Is the hold really ment to be cancelled? I think it would work if the message was something like: "This item is on hold for another patron. The hold will be overridden, but not cancelled."
And let me just add that everything else seems to be working fine so far, and I think this will be a very good enhancement, speeding up the checkout process a lot!
Created attachment 26814 [details] [review] Bug 11759: FIX cancel the hold after the checkout If an item is on hold, it will be cancelled after the checkout.
Created attachment 26815 [details] [review] Bug 11759: FIX Javascript error The following JS error occurred: ReferenceError: MSG_ADD_MESSAGE is not defined The circulation.js file is useless and should not be included.
(In reply to Magnus Enger from comment #20) Thanks for testing Magnus! > If I include an item with a (item level) hold in the batch, I get the > attached message, which says: > > "This Item has been on hold for another patron. The hold will be canceled." Yes, it is the expected behavior. I provided a followup.
Hm I think I agree with Magnus here. I am not sure cancelling the hold makes sense - why not just check it out to the other patron, but leave the hold intact so the other patron can get the book later?
Created attachment 26833 [details] Checking out a book with a hold for another patron Item X is on the shelf, but also on hold for Patron A. Patron B finds it on the shelf and takes it to the checkout desk. The librarian is given the option to check the book out to Patron B or not, and optionally to delete the hold for Patron A.
With the new patch series, holds for other patrons are cancelled/deleted when a book is checked out with batch checkout. This is the opposite behaviour of the "normal" checkout (see attachment 26833 [details] and comment 26). I think the default has to be to keep the holds, but possibly with an *option* to delete them, like in the "normal" checkout. Marking as "failed QA". Jonathan: Can you try and explain why you think the holds should be deleted? I hope we can resolve this quickly, I'd love to see this in 3.16!
(In reply to Magnus Enger from comment #27) > Jonathan: Can you try and explain why you think the holds should be deleted? > I hope we can resolve this quickly, I'd love to see this in 3.16! No, you are right, we should apply the default behavior.
Created attachment 26854 [details] [review] Bug 11759: FIX the alert message if an item is on hold. If an item is on hold, the hold is not cancelled. This patch corrects the message displayed in this case.
Created attachment 27613 [details] [review] Bug 11759: FIX issue list is empty The issue list is empty after checking an item out to a patron without existing checkout. To reproduce: - Search for a patron without checkout. - Check an item out using the "normal" checkout. - Verify the checkout list contain the checkout.
I mark this patch set as does not apply since bug 11703 is going to be pushed. Jesse, Kyle told me you are working on ajaxify checkouts. Please let me know what you are doing. I would prefer to base a rebase of this feature on top of your work :)
+1 for batch checkout. Is there any need to coordinate the efforts with bug 11858 (RFID) where the RFC states batch checkouts as a specific use case?
A few thoughts: 1) Do we need to have a separate batch checkout page? Or can we add batch checkout functionality to the existing checkout page? (Perhaps having "Single" and "Batch" tabs in the UI) 2) As Viktor pointed out, how could this work with a RFID scanner providing multiple barcodes at once? In my case, I have a RFID scanner that is returning comma-separated barcodes (e.g. 12345,67890,111213). I suppose this case is similar to the textarea case, except for a difference with separator, and the RFID scanner sends a carriage return at the end of the concatenated barcode string to trigger a submit... Tricky...
> 1) Do we need to have a separate batch checkout page? Or can we add batch > checkout functionality to the existing checkout page? (Perhaps having > "Single" and "Batch" tabs in the UI) Both works for me but If possible I personally prefer not ever having to say "Oh, but you see that's a batch checkout and has it's own module". If the existing interface could handle it I'd prefer to just expand it's functionality. > 2) As Viktor pointed out, how could this work with a RFID scanner providing > multiple barcodes at once? > > In my case, I have a RFID scanner that is returning comma-separated barcodes > (e.g. 12345,67890,111213). I suppose this case is similar to the textarea > case, except for a difference with separator, and the RFID scanner sends a > carriage return at the end of the concatenated barcode string to trigger a > submit... > > Tricky... I guess the first choice is handling it server side or client wise. With the Ajax circulation I guess you could actually have a javascript that slices the barcodes and sends them one by one(?). I guess you could even make it possible to do multiple batch scans and just append all new barcodes to the queue to be handled by the script. Not an authority on the internals of Koha though so it's really just my two cents.
Created attachment 37603 [details] [review] Bug 11759: Batch checkout - prepare the ground This patch does not introduce any changes. It prepares the circulation script to accept several barcodes in parameter. A loop is done on all barcodes (until now, only 1) to generate a structure to sent to the template. At the end, only the first generated data is sent.
Created attachment 37604 [details] [review] Bug 11759: Batch checkout - Add the new template This patch is the main patch. It adds: - the new template circ/circulation_batch_checkouts.tt - the change into circ/circulation.pl === Why this feature is useful for some libraries? === Currently Koha does not allow to checkout several items at once to a user. This can cause a waste of time when a user want to checkout more than 10 items. This development has been asked to have statistics on in-house use. Every night, a librarian will enter a barcode list (from a file or a scanner : the librarian scans the barcode of the documents that users let on the tables). Barcodes will be added to a statistics patron in order to count the number of items consulted. The development has been expanded to cover another need: some special libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional Library"). These libraries loan items to smaller libraries (municipal). The number of items could be very important and the current way offered by Koha is not adequate. === Test plan === 0/ Apply all patches and execute the DB change entry. 1/ Verify you are abble to do some checkouts (with confirmations, errors). = Statistics way = 2/ Create a statistical patron (e.g. category code STATS). 3/ Update the batch_checkouts pref with the category code (STATS). 4/ Go on the member page and verify the new "Batch check out" tab appears (and only for this user). 5/ Check some items out on the new page using the textarea or a file. 6/ Verify the table contains the item's information and the "Information" column contains "Local use recorded". = Real checkouts = 7/ Create a non statistical patron and update the pref. 8/ Check some items out on the new page using the textarea or a file. 9/ Verify the information in the table is consistent. 10/ Verify item without confirmation needed or impossible alert is checked out. 11/ If the logged in user has the "force_checkout" permission, all checkouts with a "confirmation needed" message can be done. If the logged in user does not have it, there is no way to force the checkout.
Created attachment 37605 [details] [review] Bug 11759: Add links to the new page
Created attachment 37606 [details] [review] Bug 11759: Add some css to highlight warnings and errors
Created attachment 37607 [details] [review] Bug 11759: Batch checkout - DB changes Add the new pref batch_checkouts in DB.
Created attachment 37608 [details] [review] Bug 11759: (follow-up) Some fixes This is a squash of the following patches: Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc). Bug 11759: FIX Javascript error The following JS error occurred: ReferenceError: MSG_ADD_MESSAGE is not defined The circulation.js file is useless and should not be included. Bug 11759: FIX the alert message if an item is on hold. If an item is on hold, the hold is not cancelled. This patch corrects the message displayed in this case. Bug 11759: FIX issue list is empty The issue list is empty after checking an item out to a patron without existing checkout. To reproduce: - Search for a patron without checkout. - Check an item out using the "normal" checkout. - Verify the checkout list contain the checkout.
A quick note on this feature: I took a moment to rebase it, I tested it quickly and it seems to work as expected (i.e. as developed initially). This is more or less abandoned on the BibLibre side, so I don't plan to spent time on enhancement request: it should be took as it, or find someone else to do the job. Of course, I am still around for a quick fix if needed.
Created attachment 37609 [details] [review] [SIGNED-OFF] Bug 11759: Batch checkout - prepare the ground This patch does not introduce any changes. It prepares the circulation script to accept several barcodes in parameter. A loop is done on all barcodes (until now, only 1) to generate a structure to sent to the template. At the end, only the first generated data is sent. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 37610 [details] [review] [SIGNED-OFF] Bug 11759: Batch checkout - Add the new template This patch is the main patch. It adds: - the new template circ/circulation_batch_checkouts.tt - the change into circ/circulation.pl === Why this feature is useful for some libraries? === Currently Koha does not allow to checkout several items at once to a user. This can cause a waste of time when a user want to checkout more than 10 items. This development has been asked to have statistics on in-house use. Every night, a librarian will enter a barcode list (from a file or a scanner : the librarian scans the barcode of the documents that users let on the tables). Barcodes will be added to a statistics patron in order to count the number of items consulted. The development has been expanded to cover another need: some special libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional Library"). These libraries loan items to smaller libraries (municipal). The number of items could be very important and the current way offered by Koha is not adequate. === Test plan === 0/ Apply all patches and execute the DB change entry. 1/ Verify you are abble to do some checkouts (with confirmations, errors). = Statistics way = 2/ Create a statistical patron (e.g. category code STATS). 3/ Update the batch_checkouts pref with the category code (STATS). 4/ Go on the member page and verify the new "Batch check out" tab appears (and only for this user). 5/ Check some items out on the new page using the textarea or a file. 6/ Verify the table contains the item's information and the "Information" column contains "Local use recorded". = Real checkouts = 7/ Create a non statistical patron and update the pref. 8/ Check some items out on the new page using the textarea or a file. 9/ Verify the information in the table is consistent. 10/ Verify item without confirmation needed or impossible alert is checked out. 11/ If the logged in user has the "force_checkout" permission, all checkouts with a "confirmation needed" message can be done. If the logged in user does not have it, there is no way to force the checkout. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 37611 [details] [review] [SIGNED-OFF] Bug 11759: Add links to the new page Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 37612 [details] [review] [SIGNED-OFF] Bug 11759: Add some css to highlight warnings and errors Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 37613 [details] [review] [SIGNED-OFF] Bug 11759: Batch checkout - DB changes Add the new pref batch_checkouts in DB. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 37614 [details] [review] [SIGNED-OFF] Bug 11759: (follow-up) Some fixes This is a squash of the following patches: Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc). Bug 11759: FIX Javascript error The following JS error occurred: ReferenceError: MSG_ADD_MESSAGE is not defined The circulation.js file is useless and should not be included. Bug 11759: FIX the alert message if an item is on hold. If an item is on hold, the hold is not cancelled. This patch corrects the message displayed in this case. Bug 11759: FIX issue list is empty The issue list is empty after checking an item out to a patron without existing checkout. To reproduce: - Search for a patron without checkout. - Check an item out using the "normal" checkout. - Verify the checkout list contain the checkout. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Thank you Jonathan, I've just test it, and everything seems to work as expected, so I'm signing off. For me it's fine now.
Created attachment 37650 [details] [review] Bug 11759 [QA Followup] - Fix koha-qa errors
Jonathan, can you check my followup? I don't understand the double call to GetMemberIssuesAndFines
Comment on attachment 37650 [details] [review] Bug 11759 [QA Followup] - Fix koha-qa errors Review of attachment 37650 [details] [review]: ----------------------------------------------------------------- All is good, thanks! ::: circ/circulation.pl @@ -400,4 @@ > $template_params->{getTitleMessageIteminfo} = $iteminfo->{'title'}; > $template_params->{getBarcodeMessageIteminfo} = $iteminfo->{'barcode'}; > $template_params->{NEEDSCONFIRMATION} = 1; > - $template_params->{onsite_checkout} => $onsite_checkout, oops, thanks! @@ -413,5 @@ > > my ( $od, $issue, $fines ) = GetMemberIssuesAndFines($borrowernumber); > > - # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue > - my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); It a bad conflict issue. The fixme has already been removed on master.
Created attachment 37653 [details] [review] Bug 11759 [QA Followup] - Fix koha-qa errors Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 41692 [details] [review] Bug 11759: Batch checkout - prepare the ground This patch does not introduce any changes. It prepares the circulation script to accept several barcodes in parameter. A loop is done on all barcodes (until now, only 1) to generate a structure to sent to the template. At the end, only the first generated data is sent. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 41693 [details] [review] Bug 11759: Batch checkout - Add the new template This patch is the main patch. It adds: - the new template circ/circulation_batch_checkouts.tt - the change into circ/circulation.pl === Why this feature is useful for some libraries? === Currently Koha does not allow to checkout several items at once to a user. This can cause a waste of time when a user want to checkout more than 10 items. This development has been asked to have statistics on in-house use. Every night, a librarian will enter a barcode list (from a file or a scanner : the librarian scans the barcode of the documents that users let on the tables). Barcodes will be added to a statistics patron in order to count the number of items consulted. The development has been expanded to cover another need: some special libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional Library"). These libraries loan items to smaller libraries (municipal). The number of items could be very important and the current way offered by Koha is not adequate. === Test plan === 0/ Apply all patches and execute the DB change entry. 1/ Verify you are abble to do some checkouts (with confirmations, errors). = Statistics way = 2/ Create a statistical patron (e.g. category code STATS). 3/ Update the batch_checkouts pref with the category code (STATS). 4/ Go on the member page and verify the new "Batch check out" tab appears (and only for this user). 5/ Check some items out on the new page using the textarea or a file. 6/ Verify the table contains the item's information and the "Information" column contains "Local use recorded". = Real checkouts = 7/ Create a non statistical patron and update the pref. 8/ Check some items out on the new page using the textarea or a file. 9/ Verify the information in the table is consistent. 10/ Verify item without confirmation needed or impossible alert is checked out. 11/ If the logged in user has the "force_checkout" permission, all checkouts with a "confirmation needed" message can be done. If the logged in user does not have it, there is no way to force the checkout. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 41694 [details] [review] Bug 11759: Add links to the new page Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 41695 [details] [review] Bug 11759: Add some css to highlight warnings and errors Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 41696 [details] [review] Bug 11759: Batch checkout - DB changes Add the new pref batch_checkouts in DB. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 41697 [details] [review] Bug 11759: (follow-up) Some fixes This is a squash of the following patches: Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc). Bug 11759: FIX Javascript error The following JS error occurred: ReferenceError: MSG_ADD_MESSAGE is not defined The circulation.js file is useless and should not be included. Bug 11759: FIX the alert message if an item is on hold. If an item is on hold, the hold is not cancelled. This patch corrects the message displayed in this case. Bug 11759: FIX issue list is empty The issue list is empty after checking an item out to a patron without existing checkout. To reproduce: - Search for a patron without checkout. - Check an item out using the "normal" checkout. - Verify the checkout list contain the checkout. Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 41698 [details] [review] Bug 11759 [QA Followup] - Fix koha-qa errors Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Seems to work as advertised in the testplan and may prove quite useful for using RFID readers that send all barcodes in a batch.
Created attachment 41735 [details] [review] Bug 11759: Batch checkout - prepare the ground This patch does not introduce any changes. It prepares the circulation script to accept several barcodes in parameter. A loop is done on all barcodes (until now, only 1) to generate a structure to sent to the template. At the end, only the first generated data is sent. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 41736 [details] [review] Bug 11759: Batch checkout - Add the new template This patch is the main patch. It adds: - the new template circ/circulation_batch_checkouts.tt - the change into circ/circulation.pl === Why this feature is useful for some libraries? === Currently Koha does not allow to checkout several items at once to a user. This can cause a waste of time when a user want to checkout more than 10 items. This development has been asked to have statistics on in-house use. Every night, a librarian will enter a barcode list (from a file or a scanner : the librarian scans the barcode of the documents that users let on the tables). Barcodes will be added to a statistics patron in order to count the number of items consulted. The development has been expanded to cover another need: some special libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional Library"). These libraries loan items to smaller libraries (municipal). The number of items could be very important and the current way offered by Koha is not adequate. === Test plan === 0/ Apply all patches and execute the DB change entry. 1/ Verify you are abble to do some checkouts (with confirmations, errors). = Statistics way = 2/ Create a statistical patron (e.g. category code STATS). 3/ Update the batch_checkouts pref with the category code (STATS). 4/ Go on the member page and verify the new "Batch check out" tab appears (and only for this user). 5/ Check some items out on the new page using the textarea or a file. 6/ Verify the table contains the item's information and the "Information" column contains "Local use recorded". = Real checkouts = 7/ Create a non statistical patron and update the pref. 8/ Check some items out on the new page using the textarea or a file. 9/ Verify the information in the table is consistent. 10/ Verify item without confirmation needed or impossible alert is checked out. 11/ If the logged in user has the "force_checkout" permission, all checkouts with a "confirmation needed" message can be done. If the logged in user does not have it, there is no way to force the checkout. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 41737 [details] [review] Bug 11759: Add links to the new page Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 41738 [details] [review] Bug 11759: Add some css to highlight warnings and errors Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 41739 [details] [review] Bug 11759: Batch checkout - DB changes Add the new pref batch_checkouts in DB. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 41740 [details] [review] Bug 11759: (follow-up) Some fixes This is a squash of the following patches: Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed If a user pass '&batch=1' to the url, he was allowed to access to the batch checkout page even if the patron is not in an authorised category. This patch also fixes the link to "Batch check out" from the "Details" tab (cf changes in circ-menu.inc). Bug 11759: FIX Javascript error The following JS error occurred: ReferenceError: MSG_ADD_MESSAGE is not defined The circulation.js file is useless and should not be included. Bug 11759: FIX the alert message if an item is on hold. If an item is on hold, the hold is not cancelled. This patch corrects the message displayed in this case. Bug 11759: FIX issue list is empty The issue list is empty after checking an item out to a patron without existing checkout. To reproduce: - Search for a patron without checkout. - Check an item out using the "normal" checkout. - Verify the checkout list contain the checkout. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 41741 [details] [review] Bug 11759 [QA Followup] - Fix koha-qa errors Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
QA Comment: I am passing qa on this patch set, but it is not completely without some doubts. I saw some minor details needing attention (spelling, warning, count) but the functionality point below could be a discussion on itself.. Functionality: We also have something similar in Offline circulation. You can checkin, checkout etc. with koc files. Spelling: Allow patron categories allowed Idem: Breadcrumbs: Checkouts a batch Warning: Note that adding batch=1 to the URL does not imply that there is a borrowernumber circulation.pl: Use of uninitialized value in regexp compilation at /home/koha/testclone/circ/circulation.pl line 120. @$barcodes = $query->param('barcodes'); /cgi-bin/koha/circ/circulation.pl?borrowernumber=4&barcodes=1&barcodes=2 This results in "1 checkouts" tab with 2 entries (!!) Passed QA
Created attachment 43626 [details] [review] Bug 11759: (QA followup) minor text changes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 43627 [details] [review] Bug 11759: (QA followup) Sysprefs should be kosher The introduced syspref was defined before we added new guidelines for them. This patch puts them in sync with current standards. It also splits them into: - A big on/off switch (BatchCheckouts) - Patron category filter (BatchCheckoutsValidCategories) The latter is expected to go away if we move this into a boolean column on the 'categories' table, which seems a better approach. I'm filling a new bug for this last comment. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Patches pushed to master. Good job Jonathan! PS. I'm filling a couple followup bugs that I will link. I hope someone can take a look before the release.
(In reply to Tomás Cohen Arazi from comment #70) > The introduced syspref was defined before we added new guidelines > for them. Where can we find those guidelines btw ?
Frédéric, I think the text you put into "Text to go in the release notes" has been truncated :(