[Bug 27963] New: touch_all_items.pl script is not working at all
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Bug ID: 27963 Summary: touch_all_items.pl script is not working at all Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org Depends on: 18501 The touch_all_items.pl script doesn't work at all currently, e.g. it is not modifying any of the items. Based on a quick look at the history this seems to have started after "Bug 18501: (QA follow-up) Fix regressions highlighted by unit tests" (7e2514ac) commit. The itemcallnumber column would need to be marked as dirty using ->make_column_dirty('itemcallnumber') for this to work. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18501 [Bug 18501] Automatic refunds need protection from failure -- 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=27963 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |joonas.kylmala@helsinki.fi |ity.org | -- 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=27963 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Maybe the issue started actually happening after "Bug 23463: Replace ModItem with Koha::Item->store" (bbb504c). The ModItem call previously handled a lot of broken data fixing as well and didn't just update the cn_sort value. ModItem for example fixed the permanent_location column and dateformats. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|18501 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18501 [Bug 18501] Automatic refunds need protection from failure -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23463 CC| |jonathan.druart@bugs.koha-c | |ommunity.org 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=27963 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 118294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118294&action=edit Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl This script is used to fix inconsistencies in the items table. Prior to bug 23463, ModItem dealt with that. We need to make some attributes as dirty to make sure the Koha::Item->store method will fix them. Test plan: Be familiar with how touch_all_items is supposed to work and confirm that the different inconsistencies are fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|joonas.kylmala@helsinki.fi |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=27963 --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- thanks for the patch Jonathan. Since this is long running script some items are very likely deleted and we should wrap the whole modification part in an eval like it was before, don't you agree? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I thought about this when I wrote the patch and concluded that we just fetched the list before and so it should be fine. But actually you are right, to be on the safe side we could surround the whole block with the eval to prevent this unlikely (:D) situation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Jonathan, should I interpret that as you are sending v2 or? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118294|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 118328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118328&action=edit Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl This script is used to fix inconsistencies in the items table. Prior to bug 23463, ModItem dealt with that. We need to make some attributes as dirty to make sure the Koha::Item->store method will fix them. Test plan: Be familiar with how touch_all_items is supposed to work and confirm that the different inconsistencies are fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #7 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Hmm, now that you added the "return unless $item" (which is actually a really good solution I didn't think of) wrapping the whole block in the eval is not needed, only for the store it is. The call to ->make_column_dirty only throws exception if the DB column doesn't exists at all and in that case we can just halt the execution of the program completely because it won't magically appear later on. v3? :P I also looked further now into fc09b0d491b1 / Removal of ModItem and actually since the modification script was originally *not* explicitly passing the location and date fields as the fields we wanted to update it didn't do that. Only the %derived_columns listed in 2677da8f1 commit were modified, so items.cn_sort if either itemcallnumber or items.cn_source is modified. So here we need to mark only itemcallnumber and cn_source as dirty. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 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=27963 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118328|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 118333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118333&action=edit Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl This script is used to fix inconsistencies in the items table. Prior to bug 23463, ModItem dealt with that. We need to make some attributes as dirty to make sure the Koha::Item->store method will fix them. Test plan: Be familiar with how touch_all_items is supposed to work and confirm that the different inconsistencies are fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 --- Comment #9 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Thanks, I will test this now and let you know the results :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118333|0 |1 is obsolete| | --- Comment #10 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 118334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118334&action=edit Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl This script is used to fix inconsistencies in the items table. Prior to bug 23463, ModItem dealt with that. We need to make some attributes as dirty to make sure the Koha::Item->store method will fix them. Test plan: Be familiar with how touch_all_items is supposed to work and confirm that the different inconsistencies are fixed. 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=27963 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #11 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Fixes the problem! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118334|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118703&action=edit Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl This script is used to fix inconsistencies in the items table. Prior to bug 23463, ModItem dealt with that. We need to make some attributes as dirty to make sure the Koha::Item->store method will fix them. Test plan: Be familiar with how touch_all_items is supposed to work and confirm that the different inconsistencies are fixed. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good catch.. and well worked through. Passing QA... However.. it did lead me to spot that migration_tools/fix_onloan is also broken by bug 23463.. I've opened bug 28028 for this one.. but I wonder if perhaps it should be an option in this script instead? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28028 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 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=27963 --- 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=27963 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | CC| |andrew@bywatersolutions.com --- Comment #16 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27963 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- 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