[Bug 28028] New: fix_onloan.pl broken by bug 23463
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Bug ID: 28028 Summary: fix_onloan.pl broken by bug 23463 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Our data migrations specialists have found that the misc/migration_tools/fix_onloan.pl script was broken by 23463. It's clear that the Koha::Items line is missing its method, but I'm also not sure that the call to store() in the loop below will actually fix the onloan field the way ModItem used it either. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27963 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looking through the history of this script.. I'm not sure it's actually done anything for a while? It appears that it used to update the MARC record from the items table onloan field.. I don't think store does that.. or am I missing something? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 119365 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119365&action=edit Bug 28028: (bug 23463 follow-up) Fix fix_onloan.pl There is an obvious error in the script, the name of the method is missing Undefined subroutine &Koha::Items called at misc/migration_tools/fix_onloan.pl line 13. Test plan: Run the script and confirm that it does not explode -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23463 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23463 [Bug 23463] Move C4::Items CRUD subroutines to Koha::Item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119365|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 119432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119432&action=edit Bug 28028: (bug 23463 follow-up) Fix fix_onloan.pl There is an obvious error in the script, the name of the method is missing Undefined subroutine &Koha::Items called at misc/migration_tools/fix_onloan.pl line 13. Test plan: Run the script and confirm that it does not explode Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |5579 CC| |joonas.kylmala@helsinki.fi Status|Signed Off |Failed QA --- Comment #4 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- As Martin stated earlier also, this script doesn't do anything. If I'm not mistaken the whole script can be now removed because bug 5579 is merged in and we don't store items anymore in MARC record format. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5579 [Bug 5579] Remove items from biblioitems.marcxml -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Joonas Kylmälä from comment #4)
As Martin stated earlier also, this script doesn't do anything. If I'm not mistaken the whole script can be now removed because bug 5579 is merged in and we don't store items anymore in MARC record format.
I believe this script might be for updating items.onloan from issues.date_due, so it would still makes total sense for migrations. You migrate the items... you migrate the issues and then update the items.onloan for the issued items. Maybe just the script description doc is a bit off? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Yes, we may well want it to update items.on_loan.. but I don't think the store call does that any more.. so although this patch lets the script run.. I don't know that it actually makes it work as it used to. I need to dig a little further unless someone has the time to test. Katrins' correct though.. she's identified the exact use case where I think we were using it in the past... at migration time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #7 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Hmm, strange: If I look ModItem() subroutine on revision 0c8d8e867b18b61f39381d2061cd2124fe1c5ed3 (which is just before it was deleted from codebase it has not fetched issues.date_due value as far as I can see, I checked all the code paths in ModItem() to my best ability. So this would conflict with what both Martin and Katrin are remembering. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #8 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Joonas Kylmälä from comment #7)
Hmm, strange:
If I look ModItem() subroutine on revision 0c8d8e867b18b61f39381d2061cd2124fe1c5ed3 (which is just before it was deleted from codebase it has not fetched issues.date_due value as far as I can see, I checked all the code paths in ModItem() to my best ability.
So this would conflict with what both Martin and Katrin are remembering.
Yup, I now checked out Koha version just before Bug 23463 was merged: $ git reset --hard f04e77c7e5411ca7dcf761e7e1177d7362a10654 and the fix_onloan.pl script didn't update the items.onloan value to be same as in issues table. Here is the steps I used to test this:
$ git reset --hard f04e77c7e5411ca7dcf761e7e1177d7362a10654 $ reset_all # Checkout an item to patron and then: $ koha-mysql kohadev
update items SET onloan = "2020-01-01" WHERE itemnumber=549 $ koha-shell kohadev $ (inside koha-shell) perl fix_onloan.pl $ koha-mysql kohadev select * from items WHERE itemnumber=549 # and notice it didn't update
So I strongly think this script has been doing nothing after bug 5579 has been merged and we stopped storing items in MARC format. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119432|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 119607 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119607&action=edit Bug 28028: Remove misc/migration_tools/fix_onloan.pl There is an obvious error in the script since bug 23463 and it's known to be broken for 10 years now (since bug 5579). As nobody complains we can safely remove this script. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Thanks Joonas for the investigation. Let remove it then! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119607|0 |1 is obsolete| | --- Comment #11 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 119608 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119608&action=edit Bug 28028: Remove misc/migration_tools/fix_onloan.pl There is an obvious error in the script since bug 23463 and it's known to be broken for 10 years now (since bug 5579). As nobody complains we can safely remove this script. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119608|0 |1 is obsolete| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 119766 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119766&action=edit Bug 28028: Remove misc/migration_tools/fix_onloan.pl There is an obvious error in the script since bug 23463 and it's known to be broken for 10 years now (since bug 5579). As nobody complains we can safely remove this script. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This script is removed from release notes| |the codebase, as it was | |non-functional for a long | |time which also suggests | |that it wasn't used. Summary|fix_onloan.pl broken by bug |Remove broken fix_onloan.pl |23463 |maintenance script -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Totally ok with removing the script, but we need to remember to update bug descriptions when changing direction :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.06 released in| | --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.06 |21.05.00,20.11.06,20.05.12 released in| | --- Comment #16 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28028 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #17 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org