For libraries that create item records when placing an order, the dateaccessioned field gets set with the date on which the record was created, which may be several months prior to when the item actually arrives at the library. Once the item arrives and enters circulation, it may be more useful for collection management purposes to record a dateaccessioned linked to when the item actually arrived at the library. I'd like to see a new Acquisitions syspref to give the option to re-set the dateaccessioned when marking an item received. This would only apply to items that were created at time or ordering and are therefore linked to an order. In these cases, the acq data is already remembering when the order was placed so we're really not losing anything by changing dateaccessioned.
+1
What about a checkbox about this when adding the items to the orderlines?
(In reply to Tomás Cohen Arazi from comment #2) > What about a checkbox about this when adding the items to the orderlines? When you say "adding items to orderlines" do you mean when adding an order to a basket and creating items then? Or do you mean when creating items on receiving? We've got at least those two possible workflows that need to be accommodated. And it really needs to have some global default selection.
(In reply to Andrew Fuerste-Henry from comment #3) > (In reply to Tomás Cohen Arazi from comment #2) > > What about a checkbox about this when adding the items to the orderlines? > > When you say "adding items to orderlines" do you mean when adding an order > to a basket and creating items then? Or do you mean when creating items on > receiving? We've got at least those two possible workflows that need to be > accommodated. And it really needs to have some global default selection. I mean in the context items are created, I was thinking when adding items to a basket, but really meant any step in the workflow there items are created. So the user marks the order marked to update the items on receiving.
I think it's probably only needed when items are created on order, then we would want to update on receive. So maybe the checkbox should be on the receive page when linked items exist? Also totally agree with Andrew about the global default setting!
So a global setting, and the option to change that global default on receiving?
(In reply to Tomás Cohen Arazi from comment #6) > So a global setting, and the option to change that global default on > receiving? I think so. Andrew, do you agree or did we miss something?
(In reply to Katrin Fischer from comment #7) > (In reply to Tomás Cohen Arazi from comment #6) > > So a global setting, and the option to change that global default on > > receiving? > > I think so. Andrew, do you agree or did we miss something? Sounds good to me!
Ok, I implemented this all: - Syspref - Checkboxes per item, set by default using the syspref - Tweaked finishreceive.pl so it reads the checkboxes and updates dateaccessioned when required. Coool. BUT disabling the date didn't work. So I tried without any patches: MariaDB [koha_kohadev]> SELECT items.itemnumber, dateaccessioned FROM items WHERE itemnumber IN (SELECT itemnumber FROM aqorders_items WHERE ordernumber IN (SELECT ordernumber FROM aqorders WHERE basketno=1)); +------------+-----------------+ | itemnumber | dateaccessioned | +------------+-----------------+ | 973 | 2021-02-11 | | 974 | 2021-02-11 | +------------+-----------------+ 2 rows in set (0.00 sec) MariaDB [koha_kohadev]> UPDATE items SET dateaccessioned='2021-02-09' WHERE itemnumber IN (SELECT itemnumber FROM aqorders_items WHERE ordernumber IN (SELECT ordernumber FROM aqorders WHERE basketno=1)); Query OK, 10 rows affected (0.01 sec) Rows matched: 10 Changed: 10 Warnings: 0 MariaDB [koha_kohadev]> SELECT items.itemnumber, dateaccessioned FROM items WHERE itemnumber IN (SELECT itemnumber FROM aqorders_items WHERE ordernumber IN (SELECT ordernumber FROM aqorders WHERE basketno=1)); +------------+-----------------+ | itemnumber | dateaccessioned | +------------+-----------------+ | 973 | 2021-02-09 | | 974 | 2021-02-09 | +------------+-----------------+ 2 rows in set (0.00 sec) MariaDB [koha_kohadev]> SELECT items.itemnumber, dateaccessioned FROM items WHERE itemnumber IN (SELECT itemnumber FROM aqorders_items WHERE ordernumber IN (SELECT ordernumber FROM aqorders WHERE basketno=1)); +------------+-----------------+ | itemnumber | dateaccessioned | +------------+-----------------+ | 973 | 2021-02-11 | | 974 | 2021-02-11 | +------------+-----------------+ 2 rows in set (0.00 sec) BUMMER. So the actual behavior is that dateaccessioned gets updated regardless. I will upload my patches here anyway, just in case this behavior I found is incorrect and gets fixed on another bug report, and then we come back to this!
Created attachment 116717 [details] [review] Bug 26693: Add AcqItemSetDateAccessionedsWhenReceived syspref Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 116718 [details] [review] Bug 26693: Add option to update dateaccessioned when receiving an order This patchset adds: - A new syspref: AcqItemSetDateAccessionedsWhenReceived - A new column on the receive page when items are created on ordering, with a checkbox for choosing if they want the date updated - The checkbox default value honours the global syspref. To test: Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>