[Bug 13707] New: Adding a new column datereceived for items and biblioitems
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Bug ID: 13707 Summary: Adding a new column datereceived for items and biblioitems Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Database Assignee: gmcharlt@gmail.com Reporter: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org This column tells when the Item or Biblio has been received for the first time into a library. Date-of-acquisition (dateaccessioned) answers, when the Item has been ordered. Date-of-receival (datereceived) answers, when the Item has arrived to the library or when the first Item for the Biblio has for the first time arrived to the library. This is very useful regarding statistics of acquisitions if they are based on the date received instead of the date acquired. Also other cool stuff can be built on top of it, like better searches for new material. This patch adds new DB columns items.datereceived, biblioitems.datereceived, deleteditems.datereceived, deletedbiblioitems.datereceived and populates those columns from the acorders.datereceived if the Item has been acquired using the acquisitions module, or from the items.dateaccessioned-column if no acquisitions module has been used. Biblioitems.datereceived is always the oldest timestamp from all the Items the Biblio has. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |olli-antti.kivilahti@jns.fi -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35908 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35908&action=edit Bug 13707 - Adding a new column datereceived for items and biblioitems. Value accessors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35909 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35909&action=edit Bug 13707 - Adding a new column datereceived for items and biblioitems. New sortable Zebra index. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #3 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35910 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35910&action=edit Bug 13707 - Adding a new column datereceived for items and biblioitems This column tells when the Item or Biblio has been received for the first time into a library. Date-of-acquisition (dateaccessioned) answers, when the Item has been ordered. Date-of-receival (datereceived) answers, when the Item has arrived to the library or when the first Item for the Biblio has for the first time arrived to the library. This is very useful regarding statistics of acquisitions if they are based on the date received instead of the date acquired. Also other cool stuff can be built on top of it, like better searches for new material. This patch adds new DB columns items.datereceived, biblioitems.datereceived, deleteditems.datereceived, deletedbiblioitems.datereceived and populates those columns from the acorders.datereceived if the Item has been acquired using the acquisitions module, or from the items.dateaccessioned-column if no acquisitions module has been used. Biblioitems.datereceived is always the oldest timestamp from all the Items the Biblio has. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35909|0 |1 is obsolete| | --- Comment #4 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35917 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35917&action=edit Bug 13707 - Adding a new column datereceived for items and biblioitems. New sortable Zebra index. For new Biblios, this feature is automatically enabled, but if you want to make your existing biblios searchable, you must update your MARC Records from the koha DB. The easiest way is to run 'misc/batchRebuildBiblioTables.pl --upstream' to update your MARC Records from the koha DB, but you need to have Bugg 13703 deployed. After that Zebra needs to be fully reindexed. TEST PLAN: (index search) 1. Add a new Biblio. 2. Add an Item to it, either via the acquisitions module or the cataloguing module. 3. Reindex zebra partially with the "./rebuild_zebra.pl -b -z -v" or wait a while if automatic Zebra indexing is enabled in your environment. 4. Make the following search to the search box: datereceived=2015-12-04 where the Date is the day when you added those Items from step 2. (should be today) 5. You should find the Biblio you just added. TEST PLAN: (sorting search) 0. You need to prepare a searchable index of Records with the datereceived indexed. The easiest way is to use the batchRebuildBiblioTables.pl but some records can be manually created as well. M. Manual path: M.1. Add new Biblios, and Items to the using the cataloguing module's additems.pl. You can set the datereceived from the Item-form, so set some Items to past and some Items to have a datereceived in the future. Be aware that the first Item created sets the Parent Biblio's datereceived. M.2. Make a search which should find all the Biblios you manually made. ALL PATHS 3. Sort based on the datereceived (Receival date - Newest to oldest) 4. All the Records should be ordered with the most newly received Biblio on top. Note: Since we can only put Dates to Zebra, sorting is only based on the day-portion of the datereceived. The time-portion is only for potential statistical/logistical optimization reasons. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35917|0 |1 is obsolete| | --- Comment #5 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35933 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35933&action=edit Bug 13707 - Adding a new column datereceived for items and biblioitems. New sortable Zebra index. For new Biblios, this feature is automatically enabled, but if you want to make your existing biblios searchable, you must update your MARC Records from the koha DB. The easiest way is to run 'misc/batchRebuildBiblioTables.pl --upstream' to update your MARC Records from the koha DB, but you need to have Bugg 13703 deployed. After that Zebra needs to be fully reindexed. TEST PLAN: (index search) 1. Add a new Biblio. 2. Add an Item to it, either via the acquisitions module or the cataloguing module. 3. Reindex zebra partially with the "./rebuild_zebra.pl -b -z -v" or wait a while if automatic Zebra indexing is enabled in your environment. 4. Make the following search to the search box: datereceived=2015-12-04 where the Date is the day when you added those Items from step 2. (should be today) 5. You should find the Biblio you just added. TEST PLAN: (sorting search) 0. You need to prepare a searchable index of Records with the datereceived indexed. The easiest way is to use the batchRebuildBiblioTables.pl but some records can be manually created as well. M. Manual path: M.1. Add new Biblios, and Items to the using the cataloguing module's additems.pl. You can set the datereceived from the Item-form, so set some Items to past and some Items to have a datereceived in the future. Be aware that the first Item created sets the Parent Biblio's datereceived. M.2. Make a search which should find all the Biblios you manually made. ALL PATHS 3. Sort based on the datereceived (Receival date - Newest to oldest) 4. All the Records should be ordered with the most newly received Biblio on top. Note: Since we can only put Dates to Zebra, sorting is only based on the day-portion of the datereceived. The time-portion is only for potential statistical/logistical optimization reasons. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #6 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35944 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35944&action=edit Bug 13707 - 1. Adding a new column datereceived for items and biblioitems This column tells when the Item or Biblio has been received for the first time into a library. Date-of-acquisition (dateaccessioned) answers, when the Item has been ordered. Date-of-receival (datereceived) answers, when the Item has arrived to the library or when the first Item for the Biblio has for the first time arrived to the library. This is very useful regarding statistics of acquisitions if they are based on the date received instead of the date acquired. Also other cool stuff can be built on top of it, like better searches for new material. This patch adds new DB columns items.datereceived, biblioitems.datereceived, deleteditems.datereceived, deletedbiblioitems.datereceived and populates those columns from the acorders.datereceived if the Item has been acquired using the acquisitions module, or from the items.dateaccessioned-column if no acquisitions module has been used. Biblioitems.datereceived is always the oldest timestamp from all the Items the Biblio has. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #7 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35945 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35945&action=edit Bug 13707 - 2. Adding a new column datereceived for items and biblioitems. Value accessors. This makes sure that the datereceived-columns are populated, eg the Item and biblio get the date of receival. This happens when an Item is added using the cataloguin/additem.pl or the acqui/finishreceive.pl TEST PLAN: (cataloguing) 1. Add a new Biblio, either via Z39.50 or cataloguing/addbiblio.pl 2. Add an Item for the new Biblio using the cataloguing/additem.pl. This is the default view you get after saving the Biblio. 3. Observe that the new Item has a datereceived-field with current time as the timestamp. 4. Observe that the new Biblio has datereceived populated in the field where you have it mapped to. This defaults to 942$1. TEST PLAN: (acquisitions) 1. Add a new Biblio, either via Z39.50 or cataloguing/addbiblio.pl 2. Add an Item for the new Biblio using the acquisitions workflow. Close the basketgroup. 3. Receive the Item using the acqui/finishreceive.pl. 4. Observe that the new Item has a datereceived-field with current time as the timestamp. 5. Observe that the new Biblio has datereceived populated in the field where you have it mapped to. This defaults to 942$1. TEST PLAN: (break it, after any test path) 10. Receive new Items using both the acquisitions module and the cataloguin module. 11. Observe that Biblio's datereceived-field (942$1) doesn't change, but remains as the value set when receiving the first Item. 12. Observe that each Item gets the original timestamp when it has been received. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #8 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35946 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35946&action=edit Bug 13707 - 3. Adding a new column datereceived for items and biblioitems. New sortable Zebra index. For new Biblios, this feature is automatically enabled, but if you want to make your existing biblios searchable, you must update your MARC Records from the koha DB. The easiest way is to run 'misc/batchRebuildBiblioTables.pl --upstream' to update your MARC Records from the koha DB, but you need to have Bugg 13703 deployed. After that Zebra needs to be fully reindexed. TEST PLAN: (index search) 1. Add a new Biblio. 2. Add an Item to it, either via the acquisitions module or the cataloguing module. 3. Reindex zebra partially with the "./rebuild_zebra.pl -b -z -v" or wait a while if automatic Zebra indexing is enabled in your environment. 4. Make the following search to the search box: datereceived=2015-12-04 where the Date is the day when you added those Items from step 2. (should be today) 5. You should find the Biblio you just added. TEST PLAN: (sorting search) 0. You need to prepare a searchable index of Records with the datereceived indexed. The easiest way is to use the batchRebuildBiblioTables.pl but some records can be manually created as well. M. Manual path: M.1. Add new Biblios, and Items to the using the cataloguing module's additems.pl. You can set the datereceived from the Item-form, so set some Items to past and some Items to have a datereceived in the future. Be aware that the first Item created sets the Parent Biblio's datereceived. M.2. Make a search which should find all the Biblios you manually made. ALL PATHS 3. Sort based on the datereceived (Receival date - Newest to oldest) 4. All the Records should be ordered with the most newly received Biblio on top. Note: Since we can only put Dates to Zebra, sorting is only based on the day-portion of the datereceived. The time-portion is only for potential statistical/logistical optimization reasons. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35908|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35910|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35933|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35945|0 |1 is obsolete| | --- Comment #9 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35966 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35966&action=edit Bug 13707 - 2. Adding a new column datereceived for items and biblioitems. Value accessors. This makes sure that the datereceived-columns are populated, eg the Item and biblio get the date of receival. This happens when an Item is added using the cataloguin/additem.pl or the acqui/finishreceive.pl TEST PLAN: (cataloguing) 1. Add a new Biblio, either via Z39.50 or cataloguing/addbiblio.pl 2. Add an Item for the new Biblio using the cataloguing/additem.pl. This is the default view you get after saving the Biblio. 3. Observe that the new Item has a datereceived-field with current time as the timestamp. 4. Observe that the new Biblio has datereceived populated in the field where you have it mapped to. This defaults to 942$1. TEST PLAN: (acquisitions) 1. Add a new Biblio, either via Z39.50 or cataloguing/addbiblio.pl 2. Add an Item for the new Biblio using the acquisitions workflow. Close the basketgroup. 3. Receive the Item using the acqui/finishreceive.pl. 4. Observe that the new Item has a datereceived-field with current time as the timestamp. 5. Observe that the new Biblio has datereceived populated in the field where you have it mapped to. This defaults to 942$1. TEST PLAN: (break it, after any test path) 10. Receive new Items using both the acquisitions module and the cataloguin module. 11. Observe that Biblio's datereceived-field (942$1) doesn't change, but remains as the value set when receiving the first Item. 12. Observe that each Item gets the original timestamp when it has been received. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35946|0 |1 is obsolete| | --- Comment #10 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35967 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35967&action=edit Bug 13707 - 3. Adding a new column datereceived for items and biblioitems. New sortable Zebra index. For new Biblios, this feature is automatically enabled, but if you want to make your existing biblios searchable, you must update your MARC Records from the koha DB. The databaseupdate.pl -script does this for you. Also the table 'marc_subfield_structure' has an case-insensitive collation preventing adding subfield 'R' when 'r' is present. The collation is changed to utf8_bin. This has no adverse side effects since there is no need for complex text-based sorting using this table. After that Zebra needs to be fully reindexed. TEST PLAN: (index search) 1. Add a new Biblio. 2. Add an Item to it, either via the acquisitions module or the cataloguing module. 3. Reindex zebra partially with the "./rebuild_zebra.pl -b -z -v" or wait a while if automatic Zebra indexing is enabled in your environment. 4. Make the following search to the search box: datereceived=2015-12-04 where the Date is the day when you added those Items from step 2. (should be today) 5. You should find the Biblio you just added. TEST PLAN: (sorting search) 0. You need to prepare a searchable index of Records with the datereceived indexed. The easiest way is to use the batchRebuildBiblioTables.pl but some records can be manually created as well. M. Manual path: M.1. Add new Biblios, and Items to the using the cataloguing module's additems.pl. You can set the datereceived from the Item-form, so set some Items to past and some Items to have a datereceived in the future. Be aware that the first Item created sets the Parent Biblio's datereceived. M.2. Make a search which should find all the Biblios you manually made. ALL PATHS 3. Sort based on the datereceived (Receival date - Newest to oldest) 4. All the Records should be ordered with the most newly received Biblio on top. Note: Since we can only put Dates to Zebra, sorting is only based on the day-portion of the datereceived. The time-portion is only for potential statistical/logistical optimization reasons. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #11 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35968 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35968&action=edit Bug 13707 - 4. Adding a new column datereceived for items and biblioitems. Unit tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #12 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Pushed this to production here. Waiting for trouble! Have fun! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 --- Comment #13 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 35970 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35970&action=edit KD-245 - Bug 13707 - 5. Prepared searches. NOT FOR MASTER An example on how to utilize this new search index. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35967|0 |1 is obsolete| | --- Comment #14 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 42391 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42391&action=edit Bug 13707 - 3. Adding a new column datereceived for items and biblioitems. New sortable Zebra index. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13707 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35944|0 |1 is obsolete| | --- Comment #15 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 42394 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42394&action=edit Bug 13707 - 1. Adding a new column datereceived for items and biblioitems -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org