When making acquisitions from one staged file, by many branches as a joint effort, it is important to be able to make orders from the same import_record. This places some extra requirements. 1. An status = 'imported' import_record needs to be shown in the stage_file so other branches can order from it as well. So we can't "hide" a import_record from the staged_file after an order is placed. 2. Having imported one import_record, that import_record must know it is matched to the just imported Biblio, so next acquirers know that it is already in our catalog. 3. We need to know which other branches have already ordered the item so we wont end up ordering too many copies of one Biblio to the consortium. Thus we color each row and show the count of Items in the current user's branch and the total amount of Items in the whole consortium. Additional tooltip listing of Item counts by Branch is displayed so we know are there any such Items near us. 4. If we know we already have a matching biblio in Koha, we can optionally overlay the existing Biblio with the new one. (We don't really need it but looks like Bug 12074 needs it). Also a good hook to attach more advanced automatic overlaying/transformation mechanisms. TEST PLAN: SETUP: 0a. Define a Matcher from admin/matching-rules.pl. We think good starting values are: rules, score 020a, 1000 024a, 1000 028a, 1000 245a, 500 240a, 500 110a, 300 100a, 300 Matching threshold 800 0b. Stage a MARC file. 1. Start making an order from a staged_file, stop when you see the import_records after you selected the batch to order from at acqui/addorderiso2709.pl?import_batch_id=50... 2. If you have matches, they are colored and the Item counts are visible. If not, order any item and return to the previous view and reload. 3. Observe that you should now have atleast one match. The match displays the amount of items in your branch, in your consortium, and a tooltip from the record title, showing a breakdown of items by branch. 4. When you add more orders, you get more order lines, but all orders are for the same Biblio, thus you don't get many Biblios, one per order. TODO: Unit tests. TODO: Better test plan.
Created attachment 33085 [details] [review] Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information, choose to overlay matched records. When making acquisitions from one staged file, by many branches as a joint effort, it is important to be able to make orders from the same import_record. This places some extra requirements. 1. An status = 'imported' import_record needs to be shown in the stage_file so other branches can order from it as well. So we can't "hide" a import_record from the staged_file after an order is placed. 2. Having imported one import_record, that import_record must know it is matched to the just imported Biblio, so next acquirers know that it is already in our catalog. 3. We need to know which other branches have already ordered the item so we wont end up ordering too many copies of one Biblio to the consortium. Thus we color each row and show the count of Items in the current user's branch and the total amount of Items in the whole consortium. Additional tooltip listing of Item counts by Branch is displayed so we know are there any such Items near us. 4. If we know we already have a matching biblio in Koha, we can optionally overlay the existing Biblio with the new one. (We don't really need it but looks like Bg_12074 needs it). Also a good hook to attach more advanced automatic overlaying/transformation mechanisms. TEST PLAN: SETUP: 0a. Define a Matcher from admin/matching-rules.pl. We think good starting values are: rules, score 020a, 1000 024a, 1000 028a, 1000 245a, 500 240a, 500 110a, 300 100a, 300 Matching threshold 800 0b. Stage a MARC file. 1. Start making an order from a staged_file, stop when you see the import_records after you selected the batch to order from at acqui/addorderiso2709.pl?import_batch_id=50... 2. If you have matches, they are colored and the Item counts are visible. If not, order any item and return to the previous view and reload. 3. Observe that you should now have atleast one match. The match displays the amount of items in your branch, in your consortium, and a tooltip from the record title, showing a breakdown of items by branch. 4. When you add more orders, you get more order lines, but all orders are for the same Biblio, thus you don't get many Biblios, one per order. TODO: Unit tests. TODO: Better test plan.
Created attachment 33087 [details] pure awesomeness of this feature showcased. Adding a screenshot of this feature to make the intent more clear.
Created attachment 33088 [details] [review] Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information, choose to overlay matched records. When making acquisitions from one staged file, by many branches as a joint effort, it is important to be able to make orders from the same import_record. This places some extra requirements. 1. An status = 'imported' import_record needs to be shown in the stage_file so other branches can order from it as well. So we can't "hide" a import_record from the staged_file after an order is placed. 2. Having imported one import_record, that import_record must know it is matched to the just imported Biblio, so next acquirers know that it is already in our catalog. 3. We need to know which other branches have already ordered the item so we wont end up ordering too many copies of one Biblio to the consortium. Thus we color each row and show the count of Items in the current user's branch and the total amount of Items in the whole consortium. Additional tooltip listing of Item counts by Branch is displayed so we know are there any such Items near us. 4. If we know we already have a matching biblio in Koha, we can optionally overlay the existing Biblio with the new one. (We don't really need it but looks like Bg_12074 needs it). Also a good hook to attach more advanced automatic overlaying/transformation mechanisms. TEST PLAN: SETUP: 0a. Define a Matcher from admin/matching-rules.pl. We think good starting values are: rules, score 020a, 1000 024a, 1000 028a, 1000 245a, 500 240a, 500 110a, 300 100a, 300 Matching threshold 800 0b. Stage a MARC file. 1. Start making an order from a staged_file, stop when you see the import_records after you selected the batch to order from at acqui/addorderiso2709.pl?import_batch_id=50... 2. If you have matches, they are colored and the Item counts are visible. If not, order any item and return to the previous view and reload. 3. Observe that you should now have atleast one match. The match displays the amount of items in your branch, in your consortium, and a tooltip from the record title, showing a breakdown of items by branch. 4. When you add more orders, you get more order lines, but all orders are for the same Biblio, thus you don't get many Biblios, one per order. TODO: Unit tests. TODO: Better test plan.
Created attachment 33090 [details] [review] Bug 13182 - When placing an order from a staged file, remove dead code THIS IS MADNESS!
Created attachment 33376 [details] [review] Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information. When making acquisitions from one staged file, by many branches as a joint effort, it is important to be able to make orders from the same import_record and to know how many Items have already been ordered. Also introduces misc/maintenance/matchAllStagedRecords.pl to recreate import_record matchings based on the given matcher. This places some extra requirements. 1. An status = 'imported' import_record needs to be shown in the stage_file so other branches can order from it as well. So we can't "hide" a import_record from the staged_file after an order is placed. 2. Having imported one import_record, that import_record must know it is matched to the just imported Biblio, so next acquirers know that it is already in our catalog. 3. We need to know which other branches have already ordered the item so we wont end up ordering too many copies of one Biblio to the consortium. Thus we color each row and show the count of Items in the current user's branch and the total amount of Items in the whole consortium. Additional tooltip listing of Item counts by Branch is displayed so we know are there any such Items near us. TEST PLAN: SETUP: 0a. Define a Matcher from admin/matching-rules.pl. We think good starting values are: Search index, Tag , score ISBN, 020a, 1000 Identifier-standard, 024a, 1000 Identifier-standard, 028a, 1000 Title, 245a, 500 Title-uniform, 240a, 500 Personal-name, 110a, 300 Corporate-name, 100a, 300 Matching threshold 800 You can use an existing matcher as well if you have it configured to other than ISBN. 0b. Stage a MARC file. BASIC USAGE: 1. Start making an order from a staged_file, stop when you see the import_records after you selected the batch to order from at acqui/addorderiso2709.pl?import_batch_id=50... 2. If you have matches, they are colored and the Item counts are visible. If not, order any item and return to the previous view and reload. 3. Observe that you should now have atleast one match. The match displays the amount of items in your branch, in your consortium, and a tooltip from the record title, showing a breakdown of items by branch. 4. When you add more orders, you get more order lines, but all orders are for the same Biblio, thus you don't get many Biblios for many orderlines. UNLEASH THE HOUNDS OF ACQUISITIONS: 1. Order a bunch of biblios and items for homebranch A. Make sure that you get the ordered orderlines in your basket. 2. Order a bunch of biblios and items for homebranch B. 3. Order a bunch of biblios and items for homebranch C. 4. Observe that the biblios already ordered into your catalogue are colored and a number is in front of the title. First number is the count of Items for this Biblio in user's logged-in-branch, second is the total number of Items in the catalogue. Hovering mouse pointer over the title displays a tooltip with a breakdown of all Items by homebranch. TODO: Unit tests.
Created attachment 33377 [details] [review] Bug 13182 - Overlay an existing Biblio with the acquired import_record If we know we already have a matching biblio in Koha, we can optionally overlay the existing Biblio with the new one. (We don't really need it but looks like Bg_12074 needs it). Also a good hook to attach more advanced automatic overlaying/transformation mechanisms.
Created attachment 33378 [details] [review] Bug 13182 - Overlay an existing Biblio with the acquired import_record If we know we already have a matching biblio in Koha, we can optionally overlay the existing Biblio with the new one. (We don't really need it but looks like Bg_12074 needs it). TEST PLAN 1. Add Items to an order from a staged file. 2. Go and edit the newly added Biblio. Set the field 003 to "TEST ME GENTLY". 3. Add more Items for this same biblio from the same staged_file. 4. While selecting what to add, check the "Overlay?"-checkbox to replace the existing Bibliographic record with the import_record you are ordering. 5. Save the orderline selection. 6. Observe that the existing modified biblio has changed to it's latest revision.
Created attachment 33379 [details] [review] Bug 13182 - Remove really dead code.
This feature is pending proper unit tests but looking forward to some feedback from the community.
Hi, I'll try to test this patch next thursday (testing party) But now, patch doesn't apply on a sandbox : The sandbox you've requested is not ready. Some problems occurred applying patches from bug 13182: <h1>Something went wrong !</h1>Applying: Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information. fatal: sha1 information is lacking or useless (acqui/addorderiso2709.pl). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information. When you have resolved this problem run git bz apply --continue. If you would prefer to skip this patch, instead run git bz apply --skip. To restore the original branch and stop patching run git bz apply --abort. Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information, choose to overlay matched records. 33376 - Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information. 33378 - Bug 13182 - Overlay an existing Biblio with the acquired import_record 33379 - Bug 13182 - Remove really dead code.
Created attachment 38113 [details] [review] Bug 13182 - When placing an order from a staged file, check for duplicates, display availability information. When making acquisitions from one staged file, by many branches as a joint effort, it is important to be able to make orders from the same import_record and to know how many Items have already been ordered. Also introduces misc/maintenance/matchAllStagedRecords.pl to recreate import_record matchings based on the given matcher. This places some extra requirements. 1. An status = 'imported' import_record needs to be shown in the stage_file so other branches can order from it as well. So we can't "hide" a import_record from the staged_file after an order is placed. 2. Having imported one import_record, that import_record must know it is matched to the just imported Biblio, so next acquirers know that it is already in our catalog. 3. We need to know which other branches have already ordered the item so we wont end up ordering too many copies of one Biblio to the consortium. Thus we color each row and show the count of Items in the current user's branch and the total amount of Items in the whole consortium. Additional tooltip listing of Item counts by Branch is displayed so we know are there any such Items near us. TEST PLAN: SETUP: 0a. Define a Matcher from admin/matching-rules.pl. We think good starting values are: Search index, Tag , score ISBN, 020a, 1000 Identifier-standard, 024a, 1000 Identifier-standard, 028a, 1000 Title, 245a, 500 Title-uniform, 240a, 500 Personal-name, 110a, 300 Corporate-name, 100a, 300 Matching threshold 800 You can use an existing matcher as well if you have it configured to other than ISBN. 0b. Stage a MARC file. BASIC USAGE: 1. Start making an order from a staged_file, stop when you see the import_records after you selected the batch to order from at acqui/addorderiso2709.pl?import_batch_id=50... 2. If you have matches, they are colored and the Item counts are visible. If not, order any item and return to the previous view and reload. 3. Observe that you should now have atleast one match. The match displays the amount of items in your branch, in your consortium, and a tooltip from the record title, showing a breakdown of items by branch. 4. When you add more orders, you get more order lines, but all orders are for the same Biblio, thus you don't get many Biblios for many orderlines. UNLEASH THE HOUNDS OF ACQUISITIONS: 1. Order a bunch of biblios and items for homebranch A. Make sure that you get the ordered orderlines in your basket. 2. Order a bunch of biblios and items for homebranch B. 3. Order a bunch of biblios and items for homebranch C. 4. Observe that the biblios already ordered into your catalogue are colored and a number is in front of the title. First number is the count of Items for this Biblio in user's logged-in-branch, second is the total number of Items in the catalogue. Hovering mouse pointer over the title displays a tooltip with a breakdown of all Items by homebranch. TODO: Unit tests. NOTE: Please check rebase I did.
Created attachment 38114 [details] [review] Bug 13182 - Overlay an existing Biblio with the acquired import_record If we know we already have a matching biblio in Koha, we can optionally overlay the existing Biblio with the new one. (We don't really need it but looks like Bg_12074 needs it). TEST PLAN 1. Add Items to an order from a staged file. 2. Go and edit the newly added Biblio. Set the field 003 to "TEST ME GENTLY". 3. Add more Items for this same biblio from the same staged_file. 4. While selecting what to add, check the "Overlay?"-checkbox to replace the existing Bibliographic record with the import_record you are ordering. 5. Save the orderline selection. 6. Observe that the existing modified biblio has changed to it's latest revision.
Created attachment 38115 [details] [review] Bug 13182 - Remove really dead code. NOTE: Please check the rebase I did.
Dumping this back to Assigned, since there are admittedly lacking tests. But this should apply now, and hopefully I didn't make any typographical errors. :)
Thanks for the rebase M. Tompsett!