[Bug 20461] New: New subscription form: "Item type" and "item type for older issues" are ignored
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Bug ID: 20461 Summary: New subscription form: "Item type" and "item type for older issues" are ignored Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: victor.grousset@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com Impacts also 16.11.x == Cause == In subscription-add.pl, the two params aren't passed to NewSubscription() but they are to ModSubscription() == Workaround == Modify the newly created subscription to set these two values. -- 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=20461 Victor Grousset/tuxayo <victor.grousset@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Summary|New subscription form: |New subscription form: |"Item type" and "item type |"Item type" and "item type |for older issues" are |for older issues" fields |ignored |are ignored -- 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=20461 Victor Grousset/tuxayo <victor.grousset@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |victor.grousset@biblibre.co |ity.org |m -- 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=20461 --- Comment #1 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- Created attachment 73157 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73157&action=edit Bug 20461 : Serials: fix ignored params in subscription creation form In subscription-add.pl, the two params aren't passed to NewSubscription() but they are to ModSubscription() == Test plan == 1. Enable syspref "makePreviousSerialAvailable" 2. Create a minimal subscription with a value in the "Item type" and "item type for older issues" fields. 3. Edit the subscription 4. You should see that the two fields are empty. This is the bug. 5. Apply this patch 6. Do step 2 and 3 7. You should see that the two fields have the right value 8. Express the joy of a successful and easy sign off. (this is important, otherwise the sign off spell won't work!) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Victor Grousset/tuxayo <victor.grousset@biblibre.com> 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=20461 --- Comment #2 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- BTW, not other field are missing between the new and modify functions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 --- Comment #3 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- *no other fields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sandboxes@biblibre.com --- Comment #4 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by delaye <stephane.delaye@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73157|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 --- Comment #5 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 73168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73168&action=edit Bug 20461 : Serials: fix ignored params in subscription creation form In subscription-add.pl, the two params aren't passed to NewSubscription() but they are to ModSubscription() == Test plan == 1. Enable syspref "makePreviousSerialAvailable" 2. Create a minimal subscription with a value in the "Item type" and "item type for older issues" fields. 3. Edit the subscription 4. You should see that the two fields are empty. This is the bug. 5. Apply this patch 6. Do step 2 and 3 7. You should see that the two fields have the right value 8. Express the joy of a successful and easy sign off. (this is important, otherwise the sign off spell won't work!) Signed-off-by: delaye <stephane.delaye@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Victor Grousset/tuxayo <victor.grousset@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #6 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- Needs another sign off from someone not at BibLibre (current community rules) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Séverine Queune <severine.queune@bulac.fr> 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=20461 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73168|0 |1 is obsolete| | --- Comment #7 from Séverine Queune <severine.queune@bulac.fr> --- Created attachment 73174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73174&action=edit Bug 20461 : Serials: fix ignored params in subscription creation form In subscription-add.pl, the two params aren't passed to NewSubscription() but they are to ModSubscription() == Test plan == 1. Enable syspref "makePreviousSerialAvailable" 2. Create a minimal subscription with a value in the "Item type" and "item type for older issues" fields. 3. Edit the subscription 4. You should see that the two fields are empty. This is the bug. 5. Apply this patch 6. Do step 2 and 3 7. You should see that the two fields have the right value 8. Express the joy of a successful and easy sign off. (this is important, otherwise the sign off spell won't work!) Signed-off-by: delaye <stephane.delaye@biblibre.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 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=20461 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73174|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 73188 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73188&action=edit Bug 20461 : Serials: fix ignored params in subscription creation form In subscription-add.pl, the two params aren't passed to NewSubscription() but they are to ModSubscription() == Test plan == 1. Enable syspref "makePreviousSerialAvailable" 2. Create a minimal subscription with a value in the "Item type" and "item type for older issues" fields. 3. Edit the subscription 4. You should see that the two fields are empty. This is the bug. 5. Apply this patch 6. Do step 2 and 3 7. You should see that the two fields have the right value 8. Express the joy of a successful and easy sign off. (this is important, otherwise the sign off spell won't work!) Signed-off-by: delaye <stephane.delaye@biblibre.com> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> 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=20461 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |7677 CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Caused by: commit 99c25135599c99bb1f1c83d390eca4628a26f4cf BZ7677: New areas in subscriptions and new functions when receiving. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7677 [Bug 7677] Subscriptions: Ability to define default itemtype and automatically change itemtype of older issues on receive of next issue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.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=20461 Nick Clemens <nick@bywatersolutions.com> 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=20461 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all, backported to stable for 17.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x for 17.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 --- Comment #13 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- == Going further: handling corrupted data == This leaves corrupted data that can break at least "transferstoreceive.pl" (circulation → Transfers to receive) For reference, the error message is:
item-level_itypes set but no itemtype set for item (12345) at /home/koha/src/Koha/Schema/Result/Item.pm line 698. Can't call method "description" on an undefined value at /home/koha/src/circ/transferstoreceive.pl line 99.
=== Manual fix === ==== Subcriptions ==== So the problem is that subscriptions created before the fix have "Item type" and "item type for older issues" set to NULL. This (subscriptions) is data creating corrupted data (items). So one must fix them (get the subscriptionid list from the SQL bellow) one by one to set the correct types. Or with an SQL query if for all the subscriptions you put the same "Item type" and "item type for older issues" ==== Items ==== One must also fix them (get itemnumber list from SQL bellow) one by one to set the correct types. Or with batch item modification, for all the items you put the same "Item type" But if you have a different item type for the last issue, them your dreams of mass fixing the issue will likely be crushed :( (hopefully there are still way depending on the cases) === SQL queries to find corrupted data === When your fixes are done, the following SQL queries should return nothing. select itemnumber from items where itype is null; subscriptionid FROM subscription WHERE previousitemtype is null or itemtype is null; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 --- Comment #14 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- Erratum: missing SELECT at the beginning the last query: select subscriptionid FROM subscription WHERE previousitemtype is null or itemtype is null; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Victor Grousset/tuxayo <victor.grousset@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21264 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21264 [Bug 21264] Data inconsistencies - "Item type" and "item type for older issues" in subscriptions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Victor Grousset/tuxayo <victor.grousset@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=7677 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20461 --- Comment #15 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- Just to be sure, if at the creation of the subscription, the previousitemtype is forgotten. Then invalid item will still be created right? In that case (I'm not sure to have re-understood everything), is it relevant to: Do a follow-up bugzilla with a patch that prevent from changing an item's itype to "" or NULL. That it to say, if previousitemtype is invalid, don't use it. That would also deal will add the existing subscriptions that are still creating invalid items even after this patch. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org