+++ This bug was initially created as a clone of Bug #24023 +++ This bug started as a rebase of bug 24023, but as time went on and I tested that bug I found bits of it lacking and felt enough time had passed that we could try a more modern approach. To keep the work distinct, I created this bug to encompass my alternative approach. This new feature will add the ability to bundle existing items together into loanable sets linked to a new collection bibliographic record. Items will be withdrawn from their original bib and take on the circulation rules of the collection record. We update the display for items attached to a collection to show what collection they are linked to and we added the ability to expand a collection item to list it's content items.
See branch for work in progress: https://gitlab.com/mrenvoize/Koha/-/commits/bug_28854
Created attachment 124319 [details] [review] Bug 28854: Add ability to create and circulate item bundles This patch adds the ability to attach item bundles to biblio records. Item bundles can then be circulated as with normal items. Upon attaching an item to one of these item bundles, the item is automatically marked as not for loan at it's original host biblio record. When returning a bundle, the list of items that are part of this bundle will be displayed, and a verification form is exposed requireing the librarian to scan item barcodes to verify their presence. Should a bundle be found to have items missing they will be marked as lost. Bundles can also be used in the inventory tool as a filter. Test plan: 0. Apply the patch, run updatedatabase + update_dbix_class_files 1. Create a new bundle record. 1a. Create a biblio record with leader position 7 set to 'c' for collection. 1b. Create an item for this biblio record. 1c. You should now see a new 'Bundle' button next to the item in the holdings table. Test: Verify that this 'Bundle' button only appears for biblio's where leader position 7 is not 'c' for collection 1d. Use the new 'Bundle' button to trigger a modal allowing you to attach items to the bundle. Test: Enter a non-existant barcode, submit and confirm you recieve an error message. Test: Enter an existing barcode, submit and note the success message. Test: Enter the same barcode as above, submit and note the warning message. Test: Add a second item to the bib and try bundling one of the above items into this second item, note the error message. 2. Open a new tab and look at the holdings data for one of the items you attached to a bundle in step 1. Test: Verify that the holdings status displays 'Not for loan'. Test: Verify that the holdings status show which bundle the item has been attached to. 3. Perform a checkout on the first bundle item. Test: Checkout should proceed as normal, obeying the circulation rules for the item type you chose to convert into a bundle. 4. Perform a checkin on the first bundle item. Test: You should be presented with a modal that contains a list of items contained in the bundle and a test box for entering item barcodes. Test: Enter some of the barcodes for items in the bundle into the box and submit. The bundle item should have been marked as returned, you should also have been notified of missing items and have the ability to print an updated contents list. Test: Verify that the items you did not enter barcodes for are now marked as lost.
I wanted to start getting feedback for this so have uploaded a patch for testing. It includes a basic test plan, but I'm sure I've missed some area's :( so would appreciate feedback. I also realise it still needs unit tests adding for the various object methods introduced before it'll go through QA.
Created attachment 124498 [details] [review] Bug 28854: Add ability to create and circulate item bundles This patch adds the ability to attach item bundles to biblio records. Item bundles can then be circulated as with normal items. Upon attaching an item to one of these item bundles, the item is automatically marked as not for loan at it's original host biblio record. When returning a bundle, the list of items that are part of this bundle will be displayed, and a verification form is exposed requireing the librarian to scan item barcodes to verify their presence. Should a bundle be found to have items missing they will be marked as lost. Bundles can also be used in the inventory tool as a filter. Test plan: 0. Apply the patch, run updatedatabase + update_dbix_class_files 1. Create a new bundle record. 1a. Create a biblio record with leader position 7 set to 'c' for collection. 1b. Create an item for this biblio record. 1c. You should now see a new 'Bundle' button next to the item in the holdings table. Test: Verify that this 'Bundle' button only appears for biblio's where leader position 7 is not 'c' for collection 1d. Use the new 'Bundle' button to trigger a modal allowing you to attach items to the bundle. Test: Enter a non-existant barcode, submit and confirm you recieve an error message. Test: Enter an existing barcode, submit and note the success message. Test: Enter the same barcode as above, submit and note the warning message. Test: Add a second item to the bib and try bundling one of the above items into this second item, note the error message. 2. Open a new tab and look at the holdings data for one of the items you attached to a bundle in step 1. Test: Verify that the holdings status displays 'Not for loan'. Test: Verify that the holdings status show which bundle the item has been attached to. 3. Perform a checkout on the first bundle item. Test: Checkout should proceed as normal, obeying the circulation rules for the item type you chose to convert into a bundle. 4. Perform a checkin on the first bundle item. Test: You should be presented with a modal that contains a list of items contained in the bundle and a test box for entering item barcodes. Test: Enter some of the barcodes for items in the bundle into the box and submit. The bundle item should have been marked as returned, you should also have been notified of missing items and have the ability to print an updated contents list. Test: Verify that the items you did not enter barcodes for are now marked as lost.
Created attachment 124616 [details] [review] Bug 28854: Add ability to create and circulate item bundles This patch adds the ability to attach item bundles to biblio records. Item bundles can then be circulated as with normal items. Upon attaching an item to one of these item bundles, the item is automatically marked as not for loan at it's original host biblio record. When returning a bundle, the list of items that are part of this bundle will be displayed, and a verification form is exposed requireing the librarian to scan item barcodes to verify their presence. Should a bundle be found to have items missing they will be marked as lost. Bundles can also be used in the inventory tool as a filter. Test plan: 0. Apply the patch, run updatedatabase + update_dbix_class_files 1. Create a new bundle record. 1a. Create a biblio record with leader position 7 set to 'c' for collection. 1b. Create an item for this biblio record. 1c. You should now see a new 'Bundle' button next to the item in the holdings table. Test: Verify that this 'Bundle' button only appears for biblio's where leader position 7 is not 'c' for collection 1d. Use the new 'Bundle' button to trigger a modal allowing you to attach items to the bundle. Test: Enter a non-existant barcode, submit and confirm you recieve an error message. Test: Enter an existing barcode, submit and note the success message. Test: Enter the same barcode as above, submit and note the warning message. Test: Add a second item to the bib and try bundling one of the above items into this second item, note the error message. 2. Open a new tab and look at the holdings data for one of the items you attached to a bundle in step 1. Test: Verify that the holdings status displays 'Not for loan'. Test: Verify that the holdings status show which bundle the item has been attached to. 3. Perform a checkout on the first bundle item. Test: Checkout should proceed as normal, obeying the circulation rules for the item type you chose to convert into a bundle. 4. Perform a checkin on the first bundle item. Test: You should be presented with a modal that contains a list of items contained in the bundle and a test box for entering item barcodes. Test: Enter some of the barcodes for items in the bundle into the box and submit. The bundle item should have been marked as returned, you should also have been notified of missing items and have the ability to print an updated contents list. Test: Verify that the items you did not enter barcodes for are now marked as lost.
Looking good so far :) I've followed the test plan and everything works as expected. There are some things that are in bug 24023 that are missing here, but they can be re-added on top of it later. The big difference between both bugs is that, in bug 24023 the biblio record is the bundle (its item is only there for circulation), whereas in bug 28854 the item record is the bundle. It means that you can do completely different bundles under the same name (the biblio title). Is that intended ? About the UI, I find the "tables in table" idea confusing. There are just too much table controls in there :) What do you think of moving the list of bundled items inside the popup that opens when you click on the "Bundle" button ? qa tool reports a weird error: FAIL Koha/Item/Bundle.pm FAIL valid Inconsistent hierarchy during C3 merge of class 'Koha::Item::Bundle': current merge results [ Koha::Item::Bundle, ] merging failed on 'Koha::Item' but it doesn't break koha, which is even more weird :)
Created attachment 125200 [details] [review] Bug 28854: Database update https://bugs.koha-community.org/show_bug.cgi?id=24454
Created attachment 125201 [details] [review] Bug 28854: DBIC Schema Updates https://bugs.koha-community.org/show_bug.cgi?id=24454
Created attachment 125202 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point 1) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 2) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 3) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. TODO: Add Object Tests + API Tests https://bugs.koha-community.org/show_bug.cgi?id=24454
Created attachment 125203 [details] [review] Bug 28854: Add bundle content display to OPAC TODO: Switch to /public api route TODO: Move expand button to right like staff client https://bugs.koha-community.org/show_bug.cgi?id=24454
Created attachment 125204 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in. https://bugs.koha-community.org/show_bug.cgi?id=24454
Created attachment 125205 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that the patron who lost the item is displayed 4) Checkin the lost item * The item should be marked as found and the items_lost_issue table should no longer contain a link to the issue https://bugs.koha-community.org/show_bug.cgi?id=24454
Created attachment 125206 [details] [review] Bug 28854: Respect WhenLostChargeReplacementFee https://bugs.koha-community.org/show_bug.cgi?id=24454
(In reply to Julian Maurice from comment #6) > Looking good so far :) > I've followed the test plan and everything works as expected. Thanks for testing and your comments Julian, very helpful. In reverse order... * Weird, I didn't see that QA failure, but will look into it.. C3 Merge always confuses me when I see it. * UI, I was thinking similar thoughts. I'm not sure whether to move it into the modal, or just try to somehow highlight the dropdown row background more to distinguish between the tables. The customer I have suggested they would like to be able to expand multiple rows so they can see two bundles together.. but I do agree at the moment it's a bit confusing. * Regarding the different level, I was also a bit confused by this. They are certainly keen to have it at the item level but I had thought it would be 'pick list at the biblio level' and then create bundles from that pick list at the item level. The didn't want the pick list at all?! I still temped to make that an option, allowing bib->bib constructs at the bib level and then when adding a bundle at the item level displaying the pick list of linked bibs for one to go and build the bundle up from the shelves. The main thing that I struggled with was finding a sensible marc field. * I'm aware the inventory side of this is missing and intend to do that in the next bug (It was already getting big here so I was trying to be pragmatic.. are there any other functions I've missed.. more than happy to accommodate them).
Created attachment 126103 [details] [review] Bug 28854: Database update
Created attachment 126104 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 126105 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point 1) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 2) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 3) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. TODO: Add Object Tests + API Tests
Created attachment 126106 [details] [review] Bug 28854: Add bundle content display to OPAC TODO: Switch to /public api route TODO: Move expand button to right like staff client
Created attachment 126107 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 126108 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that the patron who lost the item is displayed 4) Checkin the lost item * The item should be marked as found and the items_lost_issue table should no longer contain a link to the issue
Created attachment 126109 [details] [review] Bug 28854: Respect WhenLostChargeReplacementFee
Created attachment 126110 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 126148 [details] [review] Bug 28854: Database update
Created attachment 126149 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 126150 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point 1) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 2) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 3) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. TODO: Add Object Tests + API Tests
Created attachment 126151 [details] [review] Bug 28854: Add bundle content display to OPAC TODO: Move expand button to right like staff client
Created attachment 126152 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 126153 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that the patron who lost the item is displayed 4) Checkin the lost item * The item should be marked as found and the items_lost_issue table should no longer contain a link to the issue
Created attachment 126154 [details] [review] Bug 28854: Respect WhenLostChargeReplacementFee
Created attachment 126155 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 126166 [details] [review] Bug 28854: Database update
Created attachment 126167 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 126168 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point 1) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 2) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 3) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. TODO: Add Object Tests + API Tests
Created attachment 126169 [details] [review] Bug 28854: Add bundle content display to OPAC TODO: Move expand button to right like staff client
Created attachment 126170 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 126171 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that the patron who lost the item is displayed 4) Checkin the lost item * The item should be marked as found and the items_lost_issue table should no longer contain a link to the issue
Created attachment 126172 [details] [review] Bug 28854: Respect WhenLostChargeReplacementFee
Created attachment 126173 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 127498 [details] [review] Bug 28854: Database update
Created attachment 127499 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 127500 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point 1) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 2) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 3) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. TODO: Add Object Tests + API Tests
Created attachment 127501 [details] [review] Bug 28854: Add bundle content display to OPAC TODO: Move expand button to right like staff client
Created attachment 127502 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 127503 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that the patron who lost the item is displayed 4) Checkin the lost item * The item should be marked as found and the items_lost_issue table should no longer contain a link to the issue
Created attachment 127504 [details] [review] Bug 28854: Respect WhenLostChargeReplacementFee
Created attachment 127505 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 127659 [details] [review] Bug 28854: Database update
Created attachment 127660 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 127661 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point 1) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 2) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 3) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. TODO: Add Object Tests + API Tests
Created attachment 127662 [details] [review] Bug 28854: Add bundle content display to OPAC TODO: Move expand button to right like staff client
Created attachment 127663 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 127664 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that the patron who lost the item is displayed 4) Checkin the lost item * The item should be marked as found and the items_lost_issue table should no longer contain a link to the issue
Created attachment 127665 [details] [review] Bug 28854: Respect WhenLostChargeReplacementFee
Created attachment 127666 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Just another rebase
Created attachment 127829 [details] [review] Bug 28854: Database update
Created attachment 127830 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 127831 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point 1) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 2) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 3) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. TODO: Add Object Tests + API Tests
Created attachment 127832 [details] [review] Bug 28854: Add bundle content display to OPAC TODO: Move expand button to right like staff client
Created attachment 127833 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 127834 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 127835 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 127836 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 127837 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 127838 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Please see the linked branch/merge request on gitlab for the patchset.. uploading rebases here was getting a bit obscene.
Created attachment 130313 [details] [review] Bug 28854: Database update
Created attachment 130314 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 130315 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. TODO: Add Object Tests + API Tests
Created attachment 130316 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 130317 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 130318 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 130319 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 130320 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 130321 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 130322 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 130323 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 130324 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Test plan
Created attachment 130325 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 130326 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 130327 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 130328 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 130329 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 130330 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 130331 [details] [review] Bug 28854: Make barcode comparison case insensative
Created attachment 130332 [details] [review] Bug 28854: (follow-up) Fix rebase re-indroduction of .json The API schema's all changed to .yaml but a rebase here re-introduced the .json links
We wrote some documentation for this, but bugzilla doesn't want to allow me to attach it..
Created attachment 130456 [details] Documentation
Thanks Martin for creating the documentation! I will have a go at testing over the weekend, unless someone beats me to it!
Created attachment 132703 [details] [review] Bug 28854: Database update
Created attachment 132704 [details] [review] Bug 28854: Rename atomicupdate (.perl -> .pl)
Created attachment 132705 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 132706 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. TODO: Add Object Tests + API Tests
Created attachment 132707 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 132708 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 132709 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 132710 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 132711 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 132712 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 132713 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 132714 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 132715 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Test plan
Created attachment 132716 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 132717 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 132718 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 132719 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 132720 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 132721 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 132722 [details] [review] Bug 28854: Make barcode comparison case insensative
Created attachment 132723 [details] [review] Bug 28854: (follow-up) Fix rebase re-indroduction of .json The API schema's all changed to .yaml but a rebase here re-introduced the .json links
All patches rebased on master + a tiny fix for the name of the atomicupdate file
Created attachment 135019 [details] [review] Bug 28854: Database update
Created attachment 135020 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 135021 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. TODO: Add Object Tests + API Tests
Created attachment 135022 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 135023 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 135024 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 135025 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 135026 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 135027 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 135028 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 135029 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 135030 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Test plan
Created attachment 135031 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 135032 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 135033 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 135034 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 135035 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 135036 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 135037 [details] [review] Bug 28854: Make barcode comparison case insensative
Another rebase after testing and finding some subtle issues with the last rebase. All seems to be working as expected now for me... ready for testing. I've squashed Julians two follow-ups, and my own rebase fixes all into the original patchset.. it was getting hard to track it all ;)
*** Bug 24023 has been marked as a duplicate of this bug. ***
This looks like it's working pretty well in the staff interface. Is there a plan to make the contents of bundles visible in the OPAC?
Good question Owen, the original sponsor for this has moved in now, but they weren't sure how they wanted things to display in the OPAC so in the end I dropped those patches from here. Biblibre used MARC linking in their original implementation and there's a bug followup submitted on this tree that allows for that too, optionally; That would allow for the display of a contents list at the bib level in effect then the box items just appear as usual.. so you get the contents list from the bib rather than having the specifics of each box (this obviously assumes each box attached to the bib is intended to include the same set of materials ) Alternatively my original implementation gave the same row expansion type display as the staff client, but without the management options. The original sponsor decided that felt confusing for the end user. I'm happy to be guided and submit something either here or as another follow-up bug like I have for the Marc linking option. Do you have any thoughts?
Created attachment 136226 [details] [review] Bug 28854: Database update
Created attachment 136227 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 136228 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. TODO: Add Object Tests + API Tests
Created attachment 136229 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 136230 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 136231 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 136232 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 136233 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 136234 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 136235 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 136236 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 136237 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Test plan
Created attachment 136238 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 136239 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 136240 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 136241 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 136242 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 136243 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 136244 [details] [review] Bug 28854: Make barcode comparison case insensative
Created attachment 136249 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template
Working on this one :)
Created attachment 136253 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 136254 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469
Created attachment 136264 [details] [review] Bug 28854: Database update
Created attachment 136265 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 136266 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference.
Created attachment 136267 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 136268 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 136269 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 136270 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 136271 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 136272 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 136273 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 136274 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 136275 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page.
Created attachment 136276 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 136277 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 136278 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 136279 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 136280 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 136281 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 136282 [details] [review] Bug 28854: Make barcode comparison case insensative
Created attachment 136283 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 136284 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469
Created attachment 136285 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t
Created attachment 136287 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return.
0) Documentation Read the documentation, really helpful! (comment :) ) 1) Unit tests (question) Unit tests pass. Changes marked with . have new unit tests added, but we might be missing some for the changes to checkout and holds? Hope I didn't miss them: Koha/Item checkout . return_claims (new) . return_claim (new) holds . bundle_items (new) . is_bundle (new) . bundle_host (new) . in_bundle (new) . add_to_bundle (new) . remove_from_bundle (new) C4/Circulation . AddReturn 2) Database update, installer a) The new table has the columns host and item, I was wondering if they should not have _id added to match conventions on the API etc. (question) b) I like the 'trick' on adding the LOST and NOT_LOAN values. (comment) c) installer/data/mysql/en/optional/auth_val.yml requires updating for the new system preference values (blocker) d) Changes to sysprefs.sql are missing. We can use the values from d) to pre-set the preferences for new installations correctly. (blocker) 3) Translatability, spelling, terminology a) detail.pl - buttons and other text in js (blocker) bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#addToBundleModal" data-item="' + itemnumber + '"><i class="fa fa-plus"></i> Add to bundle</a>'); bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#removeFromBundleModal" data-item="' + itemnumber + '"><i class="fa fa-minus"></i> Remove from bundle</a>'); $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">Success: Added '+barcode+'</div>'); $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">Warning: Item '+barcode+' already attached</div>'); } else { $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">Failure: Item '+barcode+' belongs to another bundle</div>'); } } else { $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">Failure: Check the logs for details</div>'); b) detail.pl - JSON titles, this and following (blocker): { "data": "biblio.author", "title": "Author", "searchable": true, "orderable": true, }, c) detail.pl - Capitalization (blocker) "title": "Item Type", d) detail.pl - Terminology (blocker) "title": "Collection code", should be just Collection e) circ/returns.tt: Why the use of i18n here? (question) <th>[% t('Title') | html %]</th> Isn't it the same as: <th>Title</th> ? Same here, .tt file with text inside a div element, should have been parsed the same without using t(). [% t('Scan all barcodes of items found in the items bundle. If any items are missing, they will be marked as lost') | html %] And here: <button type="submit" class="btn btn-default"><i class="fa fa-check"></i> [% t('Confirm checkin and mark missing items as lost') | html %]</button> 4) GUI - Configuration a) In table configuration, there is one option named external_id - while this makes sense to the API, I think it's hard on users. Why not update to barcode instead? (normal) b) The system preferences are currently spread on 2 different tabs (circulation and cataloguing). I think we should add a new sub heading 'Item bundles' to group them on the circulation tab instead. It will make setup smoother and I can imagine the section might grow in the future. (normal) 5) Permissions a) Who should be able to create item bundles? At the moment anyone with catalogue permission should be able to. (question) 5) GUI - Functionality a) As barcodes are unique, how could this happen? Should the message maybe be adjusted? (question) $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item ")+barcode+'</div>'); More functionality testing to come.
1) Unit tests Update: we are only missing chargelostitem! (blocker) Koha/Item . return_claims (new) . return_claim (new) . holds (only a comment change) . bundle_items (new) . is_bundle (new) . bundle_host (new) . in_bundle (new) . add_to_bundle (new) . remove_from_bundle (new) C4/Circulation . AddReturn C4/Accounts chargelostitem
Created attachment 136340 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id.
(In reply to Katrin Fischer from comment #182) > 1) Unit tests > > Update: we are only missing chargelostitem! (blocker) Done and attached :)
Created attachment 136341 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer.
(In reply to Katrin Fischer from comment #181) > c) installer/data/mysql/en/optional/auth_val.yml requires updating for the > new system preference values (blocker) > > d) Changes to sysprefs.sql are missing. We can use the values from d) to > pre-set the preferences for new installations correctly. (blocker) Done and attached :)
Created attachment 136342 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation.
(In reply to Katrin Fischer from comment #181) > 3) Translatability, spelling, terminology Done and attached :)
Created attachment 136343 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation.
Created attachment 136344 [details] [review] Bug 28854: Database update
Created attachment 136345 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 136346 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference.
Created attachment 136347 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 136348 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 136349 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 136350 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 136351 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 136352 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 136353 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 136354 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 136355 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page.
Created attachment 136356 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 136357 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 136358 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 136359 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 136360 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 136361 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 136362 [details] [review] Bug 28854: Make barcode comparison case insensative
Created attachment 136363 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 136364 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469
Created attachment 136365 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t
Created attachment 136366 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return.
Created attachment 136367 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id.
Created attachment 136368 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer.
Created attachment 136369 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation.
Created attachment 136370 [details] [review] Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode'
Something moved.. yet another rebase was required.
(In reply to Katrin Fischer from comment #181) > 4) GUI - Configuration > > a) In table configuration, there is one option named external_id - while > this makes sense to the API, I think it's hard on users. Why not update to > barcode instead? (normal) Done and attached :)
Created attachment 136371 [details] [review] Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles'
(In reply to Katrin Fischer from comment #181) > 4) GUI - Configuration > > . . . > > b) The system preferences are currently spread on 2 different tabs > (circulation and cataloguing). I think we should add a new sub heading 'Item > bundles' to group them on the circulation tab instead. It will make setup > smoother and I can imagine the section might grow in the future. (normal) Done and attached, :)
(In reply to Katrin Fischer from comment #181) > 5) Permissions > > a) Who should be able to create item bundles? At the moment anyone with > catalogue permission should be able to. (question) I think Cataloguers should be able to, but maybe those with circulation permission too?
(In reply to Katrin Fischer from comment #181) > 6) GUI - Functionality > > a) As barcodes are unique, how could this happen? Should the message maybe > be adjusted? (question) > > $('#removeResult').replaceWith('<div id="removeResult" class="alert > alert-danger">'+_("Failed: Barcode matched more than one item > ")+barcode+'</div>'); Fair question.. I think I was just being cautious.
Created attachment 136498 [details] [review] Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62
Taking things for a test run now :) 1) Adding to bundle and removing from bundle a) When adding a non-existing barcode like "eee", I get an unspecific error message: Failure: Check the logs for details (blocker) b) The contrast is not really good on those errors I feel, maybe black text would be better on the colored background if that is an easy option. The light red background + red font is a little hard to read. (Accessibility) c) If you have a leading space in front of the barcode, it won't be recognized. This can happen easily if you copy and paste when forming the bundle and we deal with it in other places - I think we should do it here too for consistency (see also bug 30409) (normal) d) Should we be able to change contents of a bundle while it is checked out? At the moment it's possible. Maybe a 'safety question'? (question/suggestion) 2) Detail view of bundle Staff: a) From the bundle, there is no way to access the record that holds the bundled item. It would be nice if the Title could be linked in the table to allow for that. (suggestion) b) Collection is not resolved into the description in the table. (blocker) c) The item type column is empty, although the bundled item has an itemtype (blocker) d) If an item is lost, the date is formatted 'database' style. DateFormat is not applied: Last seen: 2022-06-24. DateFormat was set to DD.MM.YYYY. (blocker) e) As all items on collections now show the "Manage bundle" button, there is no way to see which item actually has bundled items. An idea here would be to add the number of bundled items to the button text. (strong suggestion?) * Empty: Manage bundle * 3 items bundled in: Manage bundle (3) f) If you have 2 items on a bundle record and "Manage bundle" the first, the button appearance changes and looks a bit 'pushed'. Now push the second "Manage bundle link". Both bundles are open now, but only the second button appears 'pushed'. Close the first bundle - the button looks pushed now... close the second, now you have a detail page with the second button looking pushed. This seems a bit of a confusing UI message. Maybe it was supposed to close the first when the second was opened? (question) 3) Detail view of bundled items a) Staff - bundled: I like the link from the status to the record there, although it makes the column quite wide for a longer one. It all has nice class mark-up, so would be easy to play with if needed. (comment) b) OPAC - bundled: We show "Added to bundle" but there is no way for the OPAC user to figure out "how to get it". I'd really like to see a way to navigate this here. Maybe we could link the status on the detail page to the bundle? (normal) 4) Checkout - nothing found there :) 5) Checkin - nothing to complain about here either. I like the new modal and its functionality. 6) Lost/return claims Checked in a bundle of 3 items, but one was 'lost'. a) Details tab: The return claim was created and in the patron account it shows Claims ( 0 1 ) on the tab. But when I click on the tab, there is nothing below. (blocker) b) Checkouts tab: The claim shows here, but also shows a little issue: In the notes column, it shows the text 'null'. And when I edit the note the text is there as well. c) When trying to resolve the checkout claim to "(Not lost)", I see an "Uncaught ReferenceError" in the console and the display of the claims table is not refreshed. When I reload the page, I can see that the claim was actually resolved. (blocker?) d) When the claim return is resolved to another lost status, like "Lost", the bundle view will show: Lost: 1. It should resolve to the description instead. (blocker) 7) Inventory on checkin feature - no complaints 8) Wish/suggestion list a) Some items are really similar if you don't see the subtitle, part_name and part_number. The bundle display and the modals in circulation only show title. I think it would make a lot of sense to add the other fields here to display as well. The use case here would be language materials for us. They often match on title ($a) and the important bit is in the other fields (work book, DVD, etc.9. They would also lend themselves to be 'bundled up'.
Created attachment 136529 [details] [review] Bug 28854: (follow-up) Improve error for item not found
Created attachment 136530 [details] [review] Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed
(In reply to Katrin Fischer from comment #224) > 1) Adding to bundle and removing from bundle > > a) When adding a non-existing barcode like "eee", I get an unspecific error > message: Failure: Check the logs for details (blocker) Fixed in follow-up attached > b) The contrast is not really good on those errors I feel, maybe black text > would be better on the colored background if that is an easy option. The > light red background + red font is a little hard to read. (Accessibility) I stick to the bookstrap standard alerts here, I'll defer to Owen for guidance.. it's an area I've felt we're really inconsistent all over the place for ages and aught to improve... but I'd rather do a consistent job everywhere in a distinct bug. > c) If you have a leading space in front of the barcode, it won't be > recognized. This can happen easily if you copy and paste when forming the > bundle and we deal with it in other places - I think we should do it here > too for consistency (see also bug 30409) (normal) Fixed in a follow-up attached.. but it felt a bit wrong to use barcodedecode here.. we should perhaps use JS instead on input. > d) Should we be able to change contents of a bundle while it is checked out? > At the moment it's possible. Maybe a 'safety question'? (question/suggestion) Really good point.. I think it probably shouldn't be possible.. I'll have a go at that next week and then continue with your review.
(In reply to Martin Renvoize from comment #227) > (In reply to Katrin Fischer from comment #224) > > 1) Adding to bundle and removing from bundle > > > > a) When adding a non-existing barcode like "eee", I get an unspecific error > > message: Failure: Check the logs for details (blocker) > > Fixed in follow-up attached Will test later when you have gone through that pile of comments :) > > b) The contrast is not really good on those errors I feel, maybe black text > > would be better on the colored background if that is an easy option. The > > light red background + red font is a little hard to read. (Accessibility) > > I stick to the bookstrap standard alerts here, I'll defer to Owen for > guidance.. it's an area I've felt we're really inconsistent all over the > place for ages and aught to improve... but I'd rather do a consistent job > everywhere in a distinct bug. That's fair, not a blocker for me. > > c) If you have a leading space in front of the barcode, it won't be > > recognized. This can happen easily if you copy and paste when forming the > > bundle and we deal with it in other places - I think we should do it here > > too for consistency (see also bug 30409) (normal) > > Fixed in a follow-up attached.. but it felt a bit wrong to use barcodedecode > here.. we should perhaps use JS instead on input. I am not stuck on a specific technical solution, just wanted to show that we try to make this behaviour consistent as an argument why we should ignore spaces here too :) > > d) Should we be able to change contents of a bundle while it is checked out? > > At the moment it's possible. Maybe a 'safety question'? (question/suggestion) > > Really good point.. I think it probably shouldn't be possible.. I'll have a > go at that next week and then continue with your review.
Created attachment 136613 [details] [review] Bug 28854: Database update
Created attachment 136614 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 136615 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference.
Created attachment 136616 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 136617 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 136618 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 136619 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 136620 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 136621 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 136622 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 136623 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 136624 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page.
Created attachment 136625 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 136626 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 136627 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 136628 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 136629 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 136630 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 136631 [details] [review] Bug 28854: Make barcode comparison case insensative
Created attachment 136632 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 136633 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469
Created attachment 136634 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t
Created attachment 136635 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return.
Created attachment 136636 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id.
Created attachment 136637 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer.
Created attachment 136638 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation.
Created attachment 136639 [details] [review] Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode'
Created attachment 136640 [details] [review] Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles'
Created attachment 136641 [details] [review] Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62
Created attachment 136642 [details] [review] Bug 28854: (follow-up) Improve error for item not found
Created attachment 136643 [details] [review] Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed
Created attachment 136644 [details] [review] Bug 28854: (follow-up) Disable bundle editing for checked out This patch disables the add and remove options under bundle management when the bundled item in question is checked out.
Created attachment 136645 [details] [review] Bug 28854: (follow-up) Link bundle items to thier biblios This patch splits out the title formatting from the bundle item title display into it's own new js-biblio-format include file and adds biblio linking options.
Created attachment 136646 [details] [review] Bug 28854: (follow-up) Restore last seen date formatting We lost the date formatting somewhere along the line with rebases, this patch restores the call to $date for last seen date.
Created attachment 136647 [details] [review] Bug 28854: (follow-up) Expand itemtype [WIP] WIP:
Created attachment 136648 [details] [review] Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page.
Created attachment 136649 [details] [review] Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle' This patch adds and removes the 'active' class to the 'Manage bundle' button such that it correctly reflects whether the manage area is expanded or not for the bundle item.
Created attachment 136650 [details] [review] Bug 28854: (follow-up) Restore block styling on bundled span This patch restores a css rule that we lost during rebases that makes the 'bundled' span that appears for bundled items on their respective details pages so that the 'In bundle: ' text in the status field of the table appears beneath the 'Not for loan (Added to bundle)' text.
Created attachment 136651 [details] [review] Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client.
Created attachment 136652 [details] [review] Bug 28854: (follow-up) Add handling for part_numbers/names This patch adds part number/name handling to the new biblio-format js include. This will add such details to bundle management tables.
(In reply to Katrin Fischer from comment #224) > Taking things for a test run now :) > > c) If you have a leading space in front of the barcode, it won't be > recognized. This can happen easily if you copy and paste when forming the > bundle and we deal with it in other places - I think we should do it here > too for consistency (see also bug 30409) (normal) Decided to stick with barcodedecode as it does more than just whitespace depending on some koha settings. > d) Should we be able to change contents of a bundle while it is checked out? > At the moment it's possible. Maybe a 'safety question'? (question/suggestion) Fixed in follow-up. > 2) Detail view of bundle > > Staff: > > a) From the bundle, there is no way to access the record that holds the > bundled item. It would be nice if the Title could be linked in the table to > allow for that. (suggestion) Fixed in follow-up > b) Collection is not resolved into the description in the table. (blocker) I'm tempted to drop this column from the display entirely.. is it useful? Pulling through descriptions is not yet easily supported on the API and there's ongoing discussions around it. > c) The item type column is empty, although the bundled item has an itemtype > (blocker) As above; However, I felt this one probably was a more useful field.. I started (see WIP patch) but decided perhaps it should be done as it's own bug as it really involves adding a whole new set of API routes and js handling. > d) If an item is lost, the date is formatted 'database' style. DateFormat is > not applied: Last seen: 2022-06-24. DateFormat was set to DD.MM.YYYY. > (blocker) Restored in a follow-up.. it got lost somewhere during rebases. > e) As all items on collections now show the "Manage bundle" button, there is > no way to see which item actually has bundled items. An idea here would be > to add the number of bundled items to the button text. (strong suggestion?) > * Empty: Manage bundle > * 3 items bundled in: Manage bundle (3) Fixed in follow-up. Opted to go for (X|Y) where 'X' is "Present items attached" and Y is "Lost items attached". Might seem Owens thoughts on how this displays inside a button, I'm not entirely sure about the approach of using plain text. > f) If you have 2 items on a bundle record and "Manage bundle" the first, the > button appearance changes and looks a bit 'pushed'. > Now push the second "Manage bundle link". Both bundles are open now, but > only the second button appears 'pushed'. > Close the first bundle - the button looks pushed now... close the second, > now you have a detail page with the second button looking pushed. > This seems a bit of a confusing UI message. Maybe it was supposed to close > the first when the second was opened? (question) Enhanced in follow-up.. I wasn't actually doing anything to the button but perhaps your browser was.. I've not assigned an 'active' class to the button when the management UI is expanded and then remove it again if we collapse. > 3) Detail view of bundled items > > a) Staff - bundled: I like the link from the status to the record there, > although it makes the column quite wide for a longer one. It all has nice > class mark-up, so would be easy to play with if needed. (comment) Restored styling that was lost in rebases again.. we use 'block' display to make it go directly underneath the not for loan status. > b) OPAC - bundled: We show "Added to bundle" but there is no way for the > OPAC user to figure out "how to get it". I'd really like to see a way to > navigate this here. Maybe we could link the status on the detail page to the > bundle? (normal) This wasn't at all trivial given how our item status include is written.. I took the simple approach in the end of embedding the data in the controller.. but this is unlikely to work everwhere the include is called. I think we should take this as-is now and work together with NatFi and Tomas to make status's work via the API's. > 4) Checkout - nothing found there :) Awesome. > 5) Checkin - nothing to complain about here either. I like the new modal and > its functionality. Awesome. > 6) Lost/return claims > > Checked in a bundle of 3 items, but one was 'lost'. > > a) Details tab: The return claim was created and in the patron account it > shows Claims ( 0 1 ) on the tab. But when I click on the tab, there is > nothing below. (blocker) I couldn't replicate this, but will have another go sometime this week with cleared-down data. > b) Checkouts tab: The claim shows here, but also shows a little issue: In > the notes column, it shows the text 'null'. And when I edit the note the > text is there as well. Hmm, not sure where the 'null' text is coming from yet.. still working on this one. > c) When trying to resolve the checkout claim to "(Not lost)", I see an > "Uncaught ReferenceError" in the console and the display of the claims table > is not refreshed. When I reload the page, I can see that the claim was > actually resolved. (blocker?) Oop.. missed this one whilst working through the comments.. will have to revisit as above. > d) When the claim return is resolved to another lost status, like "Lost", > the bundle view will show: Lost: 1. It should resolve to the description > instead. (blocker) As above. > 7) Inventory on checkin feature - no complaints Awesome. > 8) Wish/suggestion list > > a) Some items are really similar if you don't see the subtitle, part_name > and part_number. The bundle display and the modals in circulation only show > title. I think it would make a lot of sense to add the other fields here to > display as well. The use case here would be language materials for us. They > often match on title ($a) and the important bit is in the other fields (work > book, DVD, etc.9. They would also lend themselves to be 'bundled up'. We use the standard biblio-title.inc include for the check-in modal so that should already contain all the details you mention. I've added a follow-up to include handling for part numbers and part names in the manage bundle UI now. Thanks for reviewing!
Created attachment 136654 [details] [review] Bug 28854: (follow-up) Prevent stringification of null in return claims The return claims table was stringifying 'null'. This patch updates the code to check for definition so we don't stringify incorrectly
(In reply to Martin Renvoize from comment #269) > (In reply to Katrin Fischer from comment #224) > > 6) Lost/return claims > > > > Checked in a bundle of 3 items, but one was 'lost'. > > > > b) Checkouts tab: The claim shows here, but also shows a little issue: In > > the notes column, it shows the text 'null'. And when I edit the note the > > text is there as well. > > Hmm, not sure where the 'null' text is coming from yet.. still working on > this one. This was a pre-existing bug in recalls.. I've fixed it in a follow-up attached.. but perhaps it should be on it's own bug report really.. Feel free to grab the patch and submit it distinctly.
Created attachment 136655 [details] [review] Bug 28854: (follow-up) Reload return claims table on resolve This is another fix for a bug in return claims. We now test for the initialised datatable and call an ajax reload directly on it if we find one instead of calling a undefined function (the function is out of scope here).
(In reply to Martin Renvoize from comment #269) > (In reply to Katrin Fischer from comment #224) > > c) When trying to resolve the checkout claim to "(Not lost)", I see an > > "Uncaught ReferenceError" in the console and the display of the claims table > > is not refreshed. When I reload the page, I can see that the claim was > > actually resolved. (blocker?) > > Oop.. missed this one whilst working through the comments.. will have to > revisit as above. Another pre-existing bug in return claims. Fixed in a follow-up here, but may be better served moved to another bug.. I'm reluctant as I don't really want to hold this one up any further...
Created attachment 136806 [details] [review] Bug 28854: (QA follow-up) Add missing TT filters
Created attachment 136809 [details] [review] Bug 28854: Database update
Created attachment 136811 [details] [review] Bug 28854: DBIC Schema Updates
Created attachment 136814 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference.
Created attachment 136817 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in.
Created attachment 136821 [details] [review] Bug 28854: Highlight bundle rows to clarify UI
Created attachment 136824 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue.
Created attachment 136826 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema
Created attachment 136829 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved.
Created attachment 136832 [details] [review] Bug 28854: Simplified status handling for bundle inventory check
Created attachment 136835 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed.
Created attachment 136838 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time.
Created attachment 136841 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page.
Created attachment 136843 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled.
Created attachment 136846 [details] [review] Bug 28854: Highlight when a scanned item is unexpected
Created attachment 136849 [details] [review] Bug 28854: Add count of scanned items to verification modal
Created attachment 136850 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle.
Created attachment 136851 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked.
Created attachment 136852 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row.
Created attachment 136853 [details] [review] Bug 28854: Make barcode comparison case insensative
Created attachment 136854 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 136855 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469
Created attachment 136856 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t
Created attachment 136857 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return.
Created attachment 136858 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id.
Created attachment 136859 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer.
Created attachment 136860 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation.
Created attachment 136861 [details] [review] Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode'
Created attachment 136862 [details] [review] Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles'
Created attachment 136863 [details] [review] Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62
Created attachment 136864 [details] [review] Bug 28854: (follow-up) Improve error for item not found
Created attachment 136865 [details] [review] Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed
Created attachment 136866 [details] [review] Bug 28854: (follow-up) Disable bundle editing for checked out This patch disables the add and remove options under bundle management when the bundled item in question is checked out.
Created attachment 136867 [details] [review] Bug 28854: (follow-up) Link bundle items to thier biblios This patch splits out the title formatting from the bundle item title display into it's own new js-biblio-format include file and adds biblio linking options.
Created attachment 136868 [details] [review] Bug 28854: (follow-up) Restore last seen date formatting We lost the date formatting somewhere along the line with rebases, this patch restores the call to $date for last seen date.
Created attachment 136869 [details] [review] Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page.
Created attachment 136870 [details] [review] Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle' This patch adds and removes the 'active' class to the 'Manage bundle' button such that it correctly reflects whether the manage area is expanded or not for the bundle item.
Created attachment 136871 [details] [review] Bug 28854: (follow-up) Restore block styling on bundled span This patch restores a css rule that we lost during rebases that makes the 'bundled' span that appears for bundled items on their respective details pages so that the 'In bundle: ' text in the status field of the table appears beneath the 'Not for loan (Added to bundle)' text.
Created attachment 136872 [details] [review] Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client.
Created attachment 136873 [details] [review] Bug 28854: (follow-up) Add handling for part_numbers/names This patch adds part number/name handling to the new biblio-format js include. This will add such details to bundle management tables.
Created attachment 136874 [details] [review] Bug 28854: (follow-up) Prevent stringification of null in return claims The return claims table was stringifying 'null'. This patch updates the code to check for definition so we don't stringify incorrectly
Created attachment 136875 [details] [review] Bug 28854: (follow-up) Reload return claims table on resolve This is another fix for a bug in return claims. We now test for the initialised datatable and call an ajax reload directly on it if we find one instead of calling a undefined function (the function is out of scope here).
Created attachment 136876 [details] [review] Bug 28854: (QA follow-up) Add missing TT filters
Created attachment 136877 [details] [review] Bug 28854: (follow-up) Remove fields from from bundle items This patch removes the itemtype and collection code fields from the bundle items table. We will add the itemtype back in at a later date with a new bug as the display code needs some careful consideration and we felt that doing that work inline here would be an unrequired blocker.
Created attachment 136905 [details] [review] Bug 28854: Database update Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136906 [details] [review] Bug 28854: DBIC Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136907 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136908 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136909 [details] [review] Bug 28854: Highlight bundle rows to clarify UI Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136910 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136911 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136912 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136913 [details] [review] Bug 28854: Simplified status handling for bundle inventory check Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136914 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136915 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136916 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136917 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136918 [details] [review] Bug 28854: Highlight when a scanned item is unexpected Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136919 [details] [review] Bug 28854: Add count of scanned items to verification modal Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136920 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136921 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136922 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136923 [details] [review] Bug 28854: Make barcode comparison case insensative Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136924 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136925 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136926 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136927 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136928 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136929 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136930 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136931 [details] [review] Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136932 [details] [review] Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136933 [details] [review] Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136934 [details] [review] Bug 28854: (follow-up) Improve error for item not found Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136935 [details] [review] Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136936 [details] [review] Bug 28854: (follow-up) Disable bundle editing for checked out This patch disables the add and remove options under bundle management when the bundled item in question is checked out. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136937 [details] [review] Bug 28854: (follow-up) Link bundle items to thier biblios This patch splits out the title formatting from the bundle item title display into it's own new js-biblio-format include file and adds biblio linking options. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136938 [details] [review] Bug 28854: (follow-up) Restore last seen date formatting We lost the date formatting somewhere along the line with rebases, this patch restores the call to $date for last seen date. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136939 [details] [review] Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136940 [details] [review] Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle' This patch adds and removes the 'active' class to the 'Manage bundle' button such that it correctly reflects whether the manage area is expanded or not for the bundle item. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136941 [details] [review] Bug 28854: (follow-up) Restore block styling on bundled span This patch restores a css rule that we lost during rebases that makes the 'bundled' span that appears for bundled items on their respective details pages so that the 'In bundle: ' text in the status field of the table appears beneath the 'Not for loan (Added to bundle)' text. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136942 [details] [review] Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136943 [details] [review] Bug 28854: (follow-up) Add handling for part_numbers/names This patch adds part number/name handling to the new biblio-format js include. This will add such details to bundle management tables. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136944 [details] [review] Bug 28854: (follow-up) Prevent stringification of null in return claims The return claims table was stringifying 'null'. This patch updates the code to check for definition so we don't stringify incorrectly Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136945 [details] [review] Bug 28854: (follow-up) Reload return claims table on resolve This is another fix for a bug in return claims. We now test for the initialised datatable and call an ajax reload directly on it if we find one instead of calling a undefined function (the function is out of scope here). Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136946 [details] [review] Bug 28854: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136947 [details] [review] Bug 28854: (follow-up) Remove fields from from bundle items This patch removes the itemtype and collection code fields from the bundle items table. We will add the itemtype back in at a later date with a new bug as the display code needs some careful consideration and we felt that doing that work inline here would be an unrequired blocker. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
I am quite happy with this now with this at 43 commits :) I have filed separate bugs for some of the enhancement ideas remaining that I don't consider blocker so we can track those. No need to grow this further. They are all bite-size things that should be easy to test later on, but no need to grow this further.
Created attachment 136949 [details] [review] Bug 28854: (follow-up) Prevent bundles from being nested
Created attachment 136978 [details] [review] Bug 28854: Database update Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136979 [details] [review] Bug 28854: DBIC Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136980 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136981 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136982 [details] [review] Bug 28854: Highlight bundle rows to clarify UI Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136985 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136988 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136989 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136990 [details] [review] Bug 28854: Simplified status handling for bundle inventory check Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136991 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136992 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136993 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136994 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136995 [details] [review] Bug 28854: Highlight when a scanned item is unexpected Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136996 [details] [review] Bug 28854: Add count of scanned items to verification modal Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136997 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136998 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 136999 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137000 [details] [review] Bug 28854: Make barcode comparison case insensative Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137001 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137002 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137003 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137004 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137005 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137006 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137007 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137008 [details] [review] Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137009 [details] [review] Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137010 [details] [review] Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137011 [details] [review] Bug 28854: (follow-up) Improve error for item not found Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137012 [details] [review] Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137013 [details] [review] Bug 28854: (follow-up) Disable bundle editing for checked out This patch disables the add and remove options under bundle management when the bundled item in question is checked out. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137014 [details] [review] Bug 28854: (follow-up) Link bundle items to thier biblios This patch splits out the title formatting from the bundle item title display into it's own new js-biblio-format include file and adds biblio linking options. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137015 [details] [review] Bug 28854: (follow-up) Restore last seen date formatting We lost the date formatting somewhere along the line with rebases, this patch restores the call to $date for last seen date. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137016 [details] [review] Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137017 [details] [review] Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle' This patch adds and removes the 'active' class to the 'Manage bundle' button such that it correctly reflects whether the manage area is expanded or not for the bundle item. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137018 [details] [review] Bug 28854: (follow-up) Restore block styling on bundled span This patch restores a css rule that we lost during rebases that makes the 'bundled' span that appears for bundled items on their respective details pages so that the 'In bundle: ' text in the status field of the table appears beneath the 'Not for loan (Added to bundle)' text. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137019 [details] [review] Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137020 [details] [review] Bug 28854: (follow-up) Add handling for part_numbers/names This patch adds part number/name handling to the new biblio-format js include. This will add such details to bundle management tables. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137021 [details] [review] Bug 28854: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137022 [details] [review] Bug 28854: (follow-up) Remove fields from from bundle items This patch removes the itemtype and collection code fields from the bundle items table. We will add the itemtype back in at a later date with a new bug as the display code needs some careful consideration and we felt that doing that work inline here would be an unrequired blocker. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Final rebase done and commits we agreed to split out into their own bugs have now been split out and added to the bugzilla tree. All ready for a final QA run. Thanks so much for the thorough and vigilent testing Katrin.. it's been really helpful putting this new feature through it's paces and I think we've come out with a much more polished piece overall.
Created attachment 137461 [details] [review] Bug 28854: Database update Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137462 [details] [review] Bug 28854: DBIC Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137463 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137464 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137465 [details] [review] Bug 28854: Highlight bundle rows to clarify UI Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137466 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137467 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137468 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137469 [details] [review] Bug 28854: Simplified status handling for bundle inventory check Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137470 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137471 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137472 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137473 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137474 [details] [review] Bug 28854: Highlight when a scanned item is unexpected Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137475 [details] [review] Bug 28854: Add count of scanned items to verification modal Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137476 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137477 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137478 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137479 [details] [review] Bug 28854: Make barcode comparison case insensative Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137480 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137481 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137482 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137483 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137484 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137485 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137486 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137487 [details] [review] Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137488 [details] [review] Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137489 [details] [review] Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137490 [details] [review] Bug 28854: (follow-up) Improve error for item not found Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137491 [details] [review] Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137492 [details] [review] Bug 28854: (follow-up) Disable bundle editing for checked out This patch disables the add and remove options under bundle management when the bundled item in question is checked out. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137493 [details] [review] Bug 28854: (follow-up) Link bundle items to thier biblios This patch splits out the title formatting from the bundle item title display into it's own new js-biblio-format include file and adds biblio linking options. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137494 [details] [review] Bug 28854: (follow-up) Restore last seen date formatting We lost the date formatting somewhere along the line with rebases, this patch restores the call to $date for last seen date. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137495 [details] [review] Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137496 [details] [review] Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle' This patch adds and removes the 'active' class to the 'Manage bundle' button such that it correctly reflects whether the manage area is expanded or not for the bundle item. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137497 [details] [review] Bug 28854: (follow-up) Restore block styling on bundled span This patch restores a css rule that we lost during rebases that makes the 'bundled' span that appears for bundled items on their respective details pages so that the 'In bundle: ' text in the status field of the table appears beneath the 'Not for loan (Added to bundle)' text. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137498 [details] [review] Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137499 [details] [review] Bug 28854: (follow-up) Add handling for part_numbers/names This patch adds part number/name handling to the new biblio-format js include. This will add such details to bundle management tables. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137500 [details] [review] Bug 28854: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Created attachment 137501 [details] [review] Bug 28854: (follow-up) Remove fields from from bundle items This patch removes the itemtype and collection code fields from the bundle items table. We will add the itemtype back in at a later date with a new bug as the display code needs some careful consideration and we felt that doing that work inline here would be an unrequired blocker. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Another rebase, now that itemgroups is in.. I was worried these features might clash more, but the rebase was fairly trivial and they seem to compliment each other nicely in the UI so far in my testing. Ready for QA :)
Created attachment 137503 [details] [review] Bug 28854: Squashed Patch Set for Reading Bug 28854: Database update Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: DBIC Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Highlight bundle rows to clarify UI Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: DBIC Update ReturnClaim Schema Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Simplified status handling for bundle inventory check Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Highlight when a scanned item is unexpected Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Add count of scanned items to verification modal Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Make barcode comparison case insensative Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Improve error for item not found Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Disable bundle editing for checked out This patch disables the add and remove options under bundle management when the bundled item in question is checked out. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Link bundle items to thier biblios This patch splits out the title formatting from the bundle item title display into it's own new js-biblio-format include file and adds biblio linking options. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Restore last seen date formatting We lost the date formatting somewhere along the line with rebases, this patch restores the call to $date for last seen date. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle' This patch adds and removes the 'active' class to the 'Manage bundle' button such that it correctly reflects whether the manage area is expanded or not for the bundle item. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Restore block styling on bundled span This patch restores a css rule that we lost during rebases that makes the 'bundled' span that appears for bundled items on their respective details pages so that the 'In bundle: ' text in the status field of the table appears beneath the 'Not for loan (Added to bundle)' text. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Add handling for part_numbers/names This patch adds part number/name handling to the new biblio-format js include. This will add such details to bundle management tables. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Bug 28854: (follow-up) Remove fields from from bundle items This patch removes the itemtype and collection code fields from the bundle items table. We will add the itemtype back in at a later date with a new bug as the display code needs some careful consideration and we felt that doing that work inline here would be an unrequired blocker. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment on attachment 137503 [details] [review] Bug 28854: Squashed Patch Set for Reading Review of attachment 137503 [details] [review]: ----------------------------------------------------------------- ::: C4/Accounts.pm @@ +70,5 @@ > sub chargelostitem { > my $dbh = C4::Context->dbh(); > my ($borrowernumber, $itemnumber, $amount, $description) = @_; > + my $item = Koha::Items->find($itemnumber); > + my $itype = $item->itemtype; Why the switch from effective_itemtype() to itemtype()? ::: Koha/Item.pm @@ +1611,5 @@ > + } > + elsif ( $_->{msg} =~ > +/Incorrect (?<type>\w+) value: '(?<value>.*)' for column \W?(?<property>\S+)/ > + ) > + { # The optional \W in the regex might be a quote or backtick There is no \W in the regex. Wish it changed, or maybe the W should be lower case?
Created attachment 137506 [details] [review] Bug 28854: (QA follow-up)
I'm getting failures from t/db_dependent/Koha/Checkouts/ReturnClaim.t In addition, can you address the two small things from my splinter review?
(In reply to Kyle M Hall from comment #448) > Comment on attachment 137503 [details] [review] [review] > Bug 28854: Squashed Patch Set for Reading > > Review of attachment 137503 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: C4/Accounts.pm > @@ +70,5 @@ > > sub chargelostitem { > > my $dbh = C4::Context->dbh(); > > my ($borrowernumber, $itemnumber, $amount, $description) = @_; > > + my $item = Koha::Items->find($itemnumber); > > + my $itype = $item->itemtype; > > Why the switch from effective_itemtype() to itemtype()? So.. the change here is actually so we can have access to the Item object lower down in the function.. the switch from finding the itemtype object directly to using the Koha::Item level accessor method means we get back the effective_itemtype object directly via the accessor. See Koha::Item->itemtype ;P > > ::: Koha/Item.pm > @@ +1611,5 @@ > > + } > > + elsif ( $_->{msg} =~ > > +/Incorrect (?<type>\w+) value: '(?<value>.*)' for column \W?(?<property>\S+)/ > > + ) > > + { # The optional \W in the regex might be a quote or backtick > > There is no \W in the regex. Wish it changed, or maybe the W should be lower > case? Huh.. this is a copy/paste from Koha::Object::store (Yes, I'd like to move it into DBIC at some point, but didn't feel it was appropriate here).. the `\W?` is there.. just after `for column` in the regex.. not sure I follow your question here I'm afraid.
(In reply to Kyle M Hall from comment #450) > I'm getting failures from t/db_dependent/Koha/Checkouts/ReturnClaim.t > In addition, can you address the two small things from my splinter review? Hmm.. I can't seem to get the test to fail.. did you run the DB update/get any errors when you ran the DB update?
> > Why the switch from effective_itemtype() to itemtype()? > > So.. the change here is actually so we can have access to the Item object > lower down in the function.. the switch from finding the itemtype object > directly to using the Koha::Item level accessor method means we get back the > effective_itemtype object directly via the accessor. See > Koha::Item->itemtype ;P Thanks! I see now! I missed that subroutine when I was looking for it! > Huh.. this is a copy/paste from Koha::Object::store (Yes, I'd like to move > it into DBIC at some point, but didn't feel it was appropriate here).. the > `\W?` is there.. just after `for column` in the regex.. not sure I follow > your question here I'm afraid. I missed where the \W was by focusing only on the patch and not the surrounding code.
Created attachment 137524 [details] [review] Bug 28854: (QA follow-up) Remove duplicate key test We now allow duplication of issue_id accross the return claims table (to allow for the case where a bundle item has been loaned and thus multiple claims can result from the same checkout.
Created attachment 137525 [details] [review] Bug 28854: (QA follow-up) Fix DB revision for AV's above 10 The authorised_value field is a varchar and so 'MAX' will sort '9' above '10' and cause issues if you have more than 9 AV values already for LOST or NOT_LOAN. This patch adds a 'CAST' to the field so we can use MAX correctly.
Created attachment 137527 [details] [review] Bug 28854: Database update Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137528 [details] [review] Bug 28854: DBIC Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137529 [details] [review] Bug 28854: Expose functionality to attach items to bundles This patch adds methods the the Koha::Item object for managing item bundling operations and then exposes those methods via the REST API. We include the new `BundleNotLoanValue` preference for setting not for loan values when an item is added to a bundle. Finally, we expose bundle management via the catalogue details page. Test plan: 0) Apply patches up to this point and run the database update 1) Configuration: `BundleNotLoanValue` should have been set by the database update and point to a newly added AV value. 2) Creating a new bundle * Add a new bib record * Mark the bib record as a 'collection' type by setting leader position 7 to 'c' * Add a new item to this bib record * You should see a new 'Manage bundle' button available in the 'Actions' column of the Holdings table. * Clicking 'Manage bundle' should expand the table to include a new row directly beneath this one. * Use the new 'Add to bundle' button that appears in this row to trigger a modal that allows entering the barcode of items you wish to add to the bundle * Upon closing the modal, the bundle content table should reload and contain your newly associated items. * You can subsequently remove an item from a bundle using the new 'Remove' button. 3) Not for loan * Items that have been added into a bundle should now appear as 'Not for loan' from their original biblio record and note which bundle they belong to. 4) Error cases * Try adding an item that already belongs to a bundle to another bundle: Note an error is displayed in the modal form. 5) The bundles feature can be disabled by unsetting the `BundleNotLoanValue` system preference. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137530 [details] [review] Bug 28854: Update circulation functionality for bundles This patch updates the circulation system to account for bundle checkins. We add a content verification step to ensure bundle content is all present at checkin and we use this comparison to mark missing items as lost. Test plan 0) Apply patches up to this point 1) Checkin an item that belongs to a bundle * An alert should be triggered noting that the item belongs to a bundle * The option to remove the item from the bundle should be clear * Click remove should result in the alert dissapearing and the item having been removed from the bundle. 2) Checkin an item bundle * A modal confirmation dialog should appear requesting each item barcode be scanned * As items are scanned they should be highlighted in yellow in the bundle content table * Upon submission; * The user will be alerted to any unexpected items that were scanned and told to put them to one side. * The user will be alerted that any missing items in the validation will have been marked as lost. * The bundle item will be marked as checked in. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137531 [details] [review] Bug 28854: Highlight bundle rows to clarify UI Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137532 [details] [review] Bug 28854: Drop unique index on issue_id in return claims With the introduction of circulating items within a bundle set, we can now loose multiple items from the bundle from the same issue. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137533 [details] [review] Bug 28854: DBIC Update ReturnClaim Schema Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137534 [details] [review] Bug 28854: Record and display who lost the item This patch records the bundle issue from which an item is marked as lost so that we may use that to infer who lost the item (for later charges and display). Test plan 0) Apply all patches up to this point 1) Checkout a bundle to a user 2) Checkin the bundle and do not scan one of the barcodes at confirmation * Note that the item not scanned is marked as lost 3) Navigate to the biblio for the lost item and note that it is marked as lost. 4) Navigate to the biblio for the collection and expand the collection item that contains the lost item. Note the item is marked as lost and checkout details are listed. 5) Checkin the lost item * The item should be marked as found and the return_claims line should be marked as resolved. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137535 [details] [review] Bug 28854: Simplified status handling for bundle inventory check Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137536 [details] [review] Bug 28854: Add option to print content list after verification We already allowed the user to view and print an updated content list after a varification showed that items were missing from the bundle. This patch adds the option to view and print the list even if the content has been varified to have not changed. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137537 [details] [review] Bug 28854: Add ordering to checkin validation modal This enhancement adds simple dataTable ordering to the verification modal table at bundle checkin time. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137538 [details] [review] Bug 28854: Improve lost details display for bundle items This patch adds the return claim details to the bundle item status display on the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137540 [details] [review] Bug 28854: Enable claims return view when BundleLostValue is set This patch adds the alternation of BundleLostValue to enable the return claims functionality when Bundles are enbled. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137541 [details] [review] Bug 28854: Highlight when a scanned item is unexpected Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137542 [details] [review] Bug 28854: Add count of scanned items to verification modal Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137543 [details] [review] Bug 28854: Add 'Remove from bundle' dialogue to details display This patch adds the counterpart of the 'Add to bundle' modal prompt for adding items to bundles from the catalogue details display. It allows for scanning barcodes to remove them from a bundle. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137544 [details] [review] Bug 28854: Add modal after checkin to print missing items list This patch adds a further modal to the post checkin alert to allow the user to print a view and print a list of items that went missing at this checkin to allow for replacements to be picked. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137545 [details] [review] Bug 28854: (follow-up) Only count rows in the body This patch fixes the count to only include table rows in the body, i.e. skip the header row. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137546 [details] [review] Bug 28854: Make barcode comparison case insensative Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137547 [details] [review] Bug 28854: (QA follow-up) Fix QA tool complaints * Typo in code comment * Permissions on atomicupdate * Missing TT filter in template * Spelling in template Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137548 [details] [review] Bug 28854: (follow-up) Use Koha::Item->itemtype introduced with bug 20469 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137549 [details] [review] Bug 28854: Unit test for Koha::Item additions This patch adds unit tests for the new methods added to Koha::Item including: * return_claim * return_claims * is_bundle * in_bundle * bundle_host * bundle_items * add_to_bundle * remove_from_bundle Test plan 1) Run t/db_dependent/Koha/Item.t Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137550 [details] [review] Bug 28854: Unit test for AddReturn addition This patch adds tests for the AddReturn change that adds an 'InBundle' message to the return. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137551 [details] [review] Bug 28854: Unit tests - chargelostitem This patch adds unit tests for the changes to chargelositem to ensure bundle charging works as expected setting the correct issue_id. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137552 [details] [review] Bug 28854: Add default AV and Syspref values This patch adds the new AV and System Preferences to the installer. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137553 [details] [review] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137554 [details] [review] Bug 28854: (follow-up) Rename column configuration to barcode This patch updates the column configuration from 'external_id' to 'barcode' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137555 [details] [review] Bug 28854: (follow-up) Move preferences to "Item bundles" Move the preferences into a section under 'Circulation' called 'Item bundles' Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137556 [details] [review] Bug 28854: (follow-up) Fix typo in templates and test plan * aready > already * 61 > 62 Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137557 [details] [review] Bug 28854: (follow-up) Improve error for item not found Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137558 [details] [review] Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items This removes any leading or trailing whitespace from the external id passed Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137559 [details] [review] Bug 28854: (follow-up) Disable bundle editing for checked out This patch disables the add and remove options under bundle management when the bundled item in question is checked out. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137560 [details] [review] Bug 28854: (follow-up) Link bundle items to thier biblios This patch splits out the title formatting from the bundle item title display into it's own new js-biblio-format include file and adds biblio linking options. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137561 [details] [review] Bug 28854: (follow-up) Restore last seen date formatting We lost the date formatting somewhere along the line with rebases, this patch restores the call to $date for last seen date. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137562 [details] [review] Bug 28854: (follow-up) Add bundle item status to manage button This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137563 [details] [review] Bug 28854: (follow-up) Make 'Manage bundle' button a 'toggle' This patch adds and removes the 'active' class to the 'Manage bundle' button such that it correctly reflects whether the manage area is expanded or not for the bundle item. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137564 [details] [review] Bug 28854: (follow-up) Restore block styling on bundled span This patch restores a css rule that we lost during rebases that makes the 'bundled' span that appears for bundled items on their respective details pages so that the 'In bundle: ' text in the status field of the table appears beneath the 'Not for loan (Added to bundle)' text. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137565 [details] [review] Bug 28854: (follow-up) Link to 'In bundle' on OPAC This patch adds the 'In bundle: Link' to the OPAC to mirror what we have on the staff client. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137566 [details] [review] Bug 28854: (follow-up) Add handling for part_numbers/names This patch adds part number/name handling to the new biblio-format js include. This will add such details to bundle management tables. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137567 [details] [review] Bug 28854: (QA follow-up) Add missing TT filters Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137568 [details] [review] Bug 28854: (follow-up) Remove fields from from bundle items This patch removes the itemtype and collection code fields from the bundle items table. We will add the itemtype back in at a later date with a new bug as the display code needs some careful consideration and we felt that doing that work inline here would be an unrequired blocker. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137569 [details] [review] Bug 28854: (QA follow-up) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137570 [details] [review] Bug 28854: (QA follow-up) Remove duplicate key test We now allow duplication of issue_id accross the return claims table (to allow for the case where a bundle item has been loaned and thus multiple claims can result from the same checkout. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 137571 [details] [review] Bug 28854: (QA follow-up) Fix DB revision for AV's above 10 The authorised_value field is a varchar and so 'MAX' will sort '9' above '10' and cause issues if you have more than 9 AV values already for LOST or NOT_LOAN. This patch adds a 'CAST' to the field so we can use MAX correctly. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 22.11. Nice work everyone, thanks!
Created attachment 137684 [details] [review] Bug 28854: (follow-up) Replace unique constraint in return claims This patch fixes the failing test for the return claims api. We add a new unique constraint to replace the one we removed earlier in the patchset. One should not be able to create a duplicate return claim for the same issue of an item. Test plan 1) Run the database update 2) Confirm that t/db_dependent/api/v1/return_claims.t now passes 3) Confirm that t/db_dependent/api/v1/items.t continues to pass 4) Bonus points, confirm that bundle checkin still works when items are missing
Follow-up attached to fix the failing introduced here on master. Not sure why I didn't think about this constraint replacement in the first place, it's a nice improvement over the simple removal I did before and shouldn't have any negative side effects on the feature introduced here. The follow-up includes an atomic update and the kohaschema change but does not include the dbic schema build ;P
Created attachment 137685 [details] [review] Bug 28854: (follow-up) Replace unique constraint in return claims This patch fixes the failing test for the return claims api. We add a new unique constraint to replace the one we removed earlier in the patchset. One should not be able to create a duplicate return claim for the same issue of an item. Test plan 1) Run the database update 2) Confirm that t/db_dependent/api/v1/return_claims.t now passes 3) Confirm that t/db_dependent/api/v1/items.t continues to pass 4) Bonus points, confirm that bundle checkin still works when items are missing Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
New error/warning in test output t/db_dependent/Koha/Item.t .. 5/25 DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '987-988' for key 'PRIMARY' at /kohadevbox/koha/Koha/Item.pm line 1601
Oops, I'll work on this today.. apologies I missed it.
Created attachment 139347 [details] [review] Bug 28854: (follow-up) Remove errant warning Oops, I left in a bare warn from debugging.. this simply removes it; it is unrequired.
Follow-up pushed to master. Thanks for addressing it promptly, Martin!
I notice a lot of nice additions to this are hiding in the 'Blocks' list here!
Documentation converted from google doc and merged.
All that bundle JS code in detail.tt could have been moved to a dedicated js file to keep the template under 2k lines :D
(In reply to Jonathan Druart from comment #510) > All that bundle JS code in detail.tt could have been moved to a dedicated js > file to keep the template under 2k lines :D True.. it grew and grew and grew. I'll create a follow-up bug and handle that
Bug 32802
CREATE TABLE `item_bundles` ( `item` int(11) NOT NULL, Why didnt we call that itemnumber? And why not an autoincrement id here too btw?
Few observations while testing a dependent report: [1] When I have a bundle with 2 items, checkout and checkin (only one barcode), I see the following on opac-detail for the missing item: Missing from bundle Added to bundle In bundle: Learning Perl / This message is not very clear (at the least). Should we replace this by Missing from bundle X ? [2] Similarly, the other item says: Added to bundle In bundle: Learning Perl / Could it be clearer to say just the latter here (In bundle X) ? [3] Furthermore, I note that the parent biblo record that contains the host item, does not show that this item is a bundle. Should we somehow indicate that ? [4] Things can get even more confusing when we add two host items to one parent record. If those two items contain various items, they are all referenced by the same name (biblio title of parent record). But these are different bundles. [5] Elaborating on point 5: If you have two bundles on same biblio record, the normal display on intranet of the biblio record crashes on the second bundle: GET /api/v1/items/2525/bundled_items: unhandled exception (Mojo::Exception)<<Can't call method "to_api" on an undefined value at /usr/share/koha/Koha/Biblio.pm line 1209.>> NOTE: This was the case with the patches of 29099 but also WITHOUT ! I have the impression that this area needs more attention still.
(In reply to Martin Renvoize from comment #269) > (In reply to Katrin Fischer from comment #224) > > d) Should we be able to change contents of a bundle while it is checked out? > > At the moment it's possible. Maybe a 'safety question'? (question/suggestion) > > Fixed in follow-up. This is not working, there is some code in the template to disable the buttons but it does not work. I have a patch to fix it, but I am wondering if it is correct to disable the edition of a bundle item that is checked out. There is no code server-side to prevent that (and so it's currently possible). Should we fix or remove this restriction?
(In reply to Jonathan Druart from comment #515) > (In reply to Martin Renvoize from comment #269) > > (In reply to Katrin Fischer from comment #224) > > > d) Should we be able to change contents of a bundle while it is checked out? > > > At the moment it's possible. Maybe a 'safety question'? (question/suggestion) > > > > Fixed in follow-up. > > This is not working, there is some code in the template to disable the > buttons but it does not work. I have a patch to fix it, but I am wondering > if it is correct to disable the edition of a bundle item that is checked out. > > There is no code server-side to prevent that (and so it's currently > possible). > > Should we fix or remove this restriction? See bug 33817.
*** Bug 28602 has been marked as a duplicate of this bug. ***
Martin, should the dbrev be changed as follows: diff --git a/installer/data/mysql/db_revs/220600015.pl b/installer/data/mysql/db_revs/220600015.pl index 89dc2d628b..11298b6860 100755 --- a/installer/data/mysql/db_revs/220600015.pl +++ b/installer/data/mysql/db_revs/220600015.pl @@ -26,7 +26,7 @@ return { $lost_val++; $dbh->do(qq{ - INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('LOST',$lost_val,'Missing from bundle') + INSERT IGNORE INTO authorised_values (category,authorised_value,lib) VALUES ('LOST',$lost_val,'Missing from bundle') }); say $out "Missing from bundle LOST AV added"; @@ -34,7 +34,7 @@ return { $nfl_val++; $dbh->do(qq{ - INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('NOT_LOAN',$nfl_val,'Added to bundle') + INSERT IGNORE INTO authorised_values (category,authorised_value,lib) VALUES ('NOT_LOAN',$nfl_val,'Added to bundle') }); say $out "Added to bundle NOT_LOAN AV added"; The dbrev crashes on a FK constraint when run twice in the context of bug 34683
(In reply to Marcel de Rooy from comment #518) > Martin, should the dbrev be changed as follows: > > diff --git a/installer/data/mysql/db_revs/220600015.pl > b/installer/data/mysql/db_revs/220600015.pl > index 89dc2d628b..11298b6860 100755 > --- a/installer/data/mysql/db_revs/220600015.pl > +++ b/installer/data/mysql/db_revs/220600015.pl > @@ -26,7 +26,7 @@ return { > $lost_val++; > > $dbh->do(qq{ > - INSERT INTO authorised_values (category,authorised_value,lib) > VALUES ('LOST',$lost_val,'Missing from bundle') > + INSERT IGNORE INTO authorised_values > (category,authorised_value,lib) VALUES ('LOST',$lost_val,'Missing from > bundle') > }); > say $out "Missing from bundle LOST AV added"; > > @@ -34,7 +34,7 @@ return { > $nfl_val++; > > $dbh->do(qq{ > - INSERT INTO authorised_values (category,authorised_value,lib) > VALUES ('NOT_LOAN',$nfl_val,'Added to bundle') > + INSERT IGNORE INTO authorised_values > (category,authorised_value,lib) VALUES ('NOT_LOAN',$nfl_val,'Added to > bundle') > }); > say $out "Added to bundle NOT_LOAN AV added"; > > > The dbrev crashes on a FK constraint when run twice in the context of bug > 34683 Note that's not the problem. We should not add the AV if one exists for "Missing from bundle", the IGNORE won't work here, and we will keep add one other "Missing from bundle".
(In reply to Jonathan Druart from comment #519) > Note that's not the problem. We should not add the AV if one exists for > "Missing from bundle", the IGNORE won't work here, and we will keep add one > other "Missing from bundle". Agreed. IGNORE just ignores :) We could do better.
(In reply to Marcel de Rooy from comment #520) > (In reply to Jonathan Druart from comment #519) > > Note that's not the problem. We should not add the AV if one exists for > > "Missing from bundle", the IGNORE won't work here, and we will keep add one > > other "Missing from bundle". > > Agreed. IGNORE just ignores :) We could do better. Bug 34881