[Bug 16834] New: Changing the "Set Inventory Date to" date doesn't do anything, date last seen always defaults to current date.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Bug ID: 16834 Summary: Changing the "Set Inventory Date to" date doesn't do anything, date last seen always defaults to current date. Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: amy@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Depends on: 14001 Our partner reports about the Inventory Tool: I've tested it out by uploading a set of recently scanned barcodes, but have discovered that changing the "set inventory date to" date doesn't really do anything. No matter what I do, after using the inventory tool, the "date last seen" is always changed to the current date by default. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14001 [Bug 14001] Inventory has bad $_ references -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- What version are they running? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #2 from Amy Kearns <amy@bywatersolutions.com> --- 3.18.09.000 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Upgrading to 3.18.13 will fix the problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- (In reply to M. Tompsett from comment #3)
Upgrading to 3.18.13 will fix the problem.
Hmmm... or maybe not? Because bug 14001 seems to be in 3.18.9. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- I'm a little groggy right now, but I think there is a setdata vs lastseendate competition in the code. I'll try to make sense later. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Does the issue exist on master? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Yes it does -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Tom Misilo <misilot@fit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |misilot@fit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Nick Clemens from comment #7)
Yes it does
Confirmed! So I found what is the problem, but no idea how to fix it: inventory.pl calls ModItem and update datelastseen (l.210), but a call to ModDateLastSeen is done later (l.332). ModDateLastSeen does not accept any parameters and update datelastseen with the today's date. My supposition is that bug 14001 introduced this bug by trying to fix something else. Maybe we could just remove the call to ModDateLastSeen and handle $moddatecount somewhere else. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |francois.charbonnier@inlibr | |o.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #9 from Blou <philippe.blouin@inlibro.com> --- Created attachment 60788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60788&action=edit Bug 16834 inventory.pl's Set Inventory Date to is ignored When entering a value in "Set Inventory date to" at the top of the UI, this value is ignored and the items are always updated with today. This is (in part) caused by ModDateLastSeen not allowing to set current day. This patch: - Makes relevant the date entered at the top (Set Inventory date to). - Makes relevant the date entered at the bottow (Inventory date). - Doesn't brake most functionalities. - Doesn't fix any of the many other bugs and issues with this broken tool. - remove a warning that was flooding the logs on every call. - Just makes the UI intuitive for common usage regarding dates. TEST: 1) find a barcode in your db, write it in a text file - set item.datelastseen to some date in the past 2) go to tools/inventory 3) Browse to select the file from 1) 4) Select a date (top) before today, and after the datelastseen entered. 5) Click submit. 6) Validate: - Datelastseen specified at the top is the one you entered. - Date Last Seen in the table is the old from the DB - item.datelastseen is now today 7) Apply the patch. Validate: - item.datelastseen is now the date you entered. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |philippe.blouin@inlibro.com Status|NEW |Needs Signoff --- Comment #10 from Blou <philippe.blouin@inlibro.com> --- This is by no mean a great patch. But our users encountered the problem, and this fixes it. When debugging, I found MANY other issues, but I tried to stay focused on just what was needed for their usage. A complete overhaul would be needed to make this tool intuitive. That's not the goal here. Just get the users the basics they need. If more problem encountered (or side effects), we'll fix... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Blou from comment #9)
This patch: - Doesn't brake most functionalities. What does it break? :)
- Doesn't fix any of the many other bugs and issues with this broken tool. OK I am looking at several and will try if it is possible to start here..
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |BLOCKED See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=12913 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Blocking this report temporarily in favor of rescuing bug 12913, taking into account the comments of David on bug 14399. The datelastseen field on the inventory form is actually useless. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #12)
The datelastseen field on the inventory form is actually useless.
Not completely btw. Bug 12631 describes a scenario with two partial barcode files and using this inventory date. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Small code review: +my $datelastseen = $input->param('datelastseen') || $input->param('setdate'); We should not do that. It will disrupt some workflows. Datelastseen is the inventory date. - my $dls = output_pref( { dt => dt_from_string( $datelastseen ), - dateformat => 'iso' } ); +1 for removing those two lines :) I am removing this whole block on bug 14399. It is weird code. - if (none { $item->{barcode} eq $_->{barcode} && !$_->{'onloan'} } @$wrongplacelist) { + if (none { $_->{barcode} && $item->{barcode} eq $_->{barcode} && !$_->{'onloan'} } @$wrongplacelist) { Looks like rescuable lines to me now. - ModDateLastSeen($item->{'itemnumber'}); + ModItem({ itemlost => 0, datelastseen => $dls }, undef, $item->{'itemnumber'}); I understand why you do it. But I guess we might need a checkbox for that ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=14399 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16834 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |RESOLVED Resolution|--- |FIXED --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Closed in favor of bug 14399 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org