[Bug 29554] New: No itemtype for neworderempty.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Bug ID: 29554 Summary: No itemtype for neworderempty.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org neworderempty contains: # Get the item types list, but only if item_level_itype is YES. Otherwise, it will be in the item, no need to display it in the biblio my @itemtypes; @itemtypes = Koha::ItemTypes->search unless C4::Context->preference('item-level_itypes'); I would argue that we should always fetch the itemtypes here. -- 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=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | Severity|enhancement |minor -- 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=29554 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think this might be used for the itemtype pull down visible in the new order form when item level itype is set to biblio. It's not visible otherwise, which would explain the comment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #1)
I think this might be used for the itemtype pull down visible in the new order form when item level itype is set to biblio. It's not visible otherwise, which would explain the comment.
Sure. But thats arguable. I dont like creating records with bibliotems.itemtype NULL even when the item level itype is item. Note that 942c is mandatory in the editor too. These NULL itemtypes make Koha crash on other code locations. Since we often assume that the itemtype should be found. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- - tagfield: "942" tagsubfield: "c" liblibrarian: "Koha item type" libopac: "Koha item type" repeatable: 0 mandatory: 1 kohafield: biblioitems.itemtype tab: 9 authorised_value: itemtypes authtypecode: "" value_builder: "" isurl: hidden: 0 frameworkcode: "" seealso: "" link: "" defaultvalue: -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|No itemtype for |neworderempty.pl may create |neworderempty.pl |records with | |biblioitems.itemtype NULL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29553 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=29554 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 127927 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127927&action=edit Bug 29554: Do not hide display of itemtypes on neworderempty Hiding them may lead to biblioitems.itemtype==NULL. We do not want that, since 942$c is mandatory. Test plan: Create basket, create order from new empty record. Signed-off-by: Marcel de Rooy <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=29554 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We never set the itemtype on biblio level and haven't had any issues with that in 18.11 - if there are issues now, that would be quite bad. But should this bug report then not be about making the field visible independent from the item-level_itype setting? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #5)
We never set the itemtype on biblio level and haven't had any issues with that in 18.11 - if there are issues now, that would be quite bad.
But should this bug report then not be about making the field visible independent from the item-level_itype setting?
Yeah the bug title is a bit cryptic, but describes the problem. And the commit title tells you the fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |david@davidnind.com --- Comment #7 from David Nind <david@davidnind.com> --- The patch no longer applies 8-(... Also, just checking my understanding what is required here for testing. Is it that when adding to a basket "From a new (empty) record", that for the catalog details section the item type should be shown regardless of the setting for the item-level_itypes system preference? This is so that the record created has an item type, and it is not empty (which can cause issues elsewhere in Koha if it is NULL). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127927|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 139117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139117&action=edit Bug 29554: Do not hide display of itemtypes on neworderempty Hiding them may lead to biblioitems.itemtype==NULL. We do not want that, since 942$c is mandatory. Test plan: Create basket, create order from new empty record. Signed-off-by: Marcel de Rooy <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=29554 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to David Nind from comment #7)
The patch no longer applies 8-(...
Also, just checking my understanding what is required here for testing.
Is it that when adding to a basket "From a new (empty) record", that for the catalog details section the item type should be shown regardless of the setting for the item-level_itypes system preference?
This is so that the record created has an item type, and it is not empty (which can cause issues elsewhere in Koha if it is NULL).
Yes that sounds fine. Have another try please.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Could you retry, David ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #11 from David Nind <david@davidnind.com> --- After applying the patch (and regardless of whether item-level_itypes is set to specific item or bibliographic record) I am getting this error when adding to a basket from a new (empty) record: Template process failed: undef error - The method Koha::ItemTypes->itemtype is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Objects.pm line 572 Koha::Objects::AUTOLOAD('Koha::ItemTypes=HASH(0x55b3275f1d40)') called at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt line 242 eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt line 242 eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt line 250 eval {...} at /kohadevbox/koha/ ... I have cleared the browser cache, plus a flush_memcached and restart_all (using KTD). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to David Nind from comment #11)
After applying the patch (and regardless of whether item-level_itypes is set to specific item or bibliographic record) I am getting this error when adding to a basket from a new (empty) record:
Template process failed: undef error - The method Koha::ItemTypes->itemtype is not covered by tests!
Trace begun at /kohadevbox/koha/Koha/Objects.pm line 572 Koha::Objects::AUTOLOAD('Koha::ItemTypes=HASH(0x55b3275f1d40)') called at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty. tt line 242 eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty. tt line 242 eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty. tt line 250 eval {...} at /kohadevbox/koha/ ...
I have cleared the browser cache, plus a flush_memcached and restart_all (using KTD).
Thx. Will have a look. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Sorry David, that was a dumb omission related to the change of ->search to scalar context. We need ->as_list currently. I updated the test plan to include choosing receiving/cataloging to make more clear what this patch is about. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139117|0 |1 is obsolete| | --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140688 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140688&action=edit Bug 29554: Do not hide display of itemtypes on neworderempty Hiding the list may lead to biblioitems.itemtype being NULL. We do not want that, since 942$c is mandatory. Test plan: Create basket and set 'create items when' to receiving or cataloging. Create order from new empty record. Check biblioitems.itemtype of created biblio. Without this patch, it would have been NULL like this: select biblionumber,title from biblio; | 7 | Test 3 | select biblionumber,itemtype from biblioitems; | 7 | NULL | Signed-off-by: Marcel de Rooy <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=29554 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=29554 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140688|0 |1 is obsolete| | --- Comment #15 from David Nind <david@davidnind.com> --- Created attachment 140701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140701&action=edit Bug 29554: Do not hide display of itemtypes on neworderempty Hiding the list may lead to biblioitems.itemtype being NULL. We do not want that, since 942$c is mandatory. Test plan: Create basket and set 'create items when' to receiving or cataloging. Create order from new empty record. Check biblioitems.itemtype of created biblio. Without this patch, it would have been NULL like this: select biblionumber,title from biblio; | 7 | Test 3 | select biblionumber,itemtype from biblioitems; | 7 | NULL | Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=29554 --- Comment #16 from David Nind <david@davidnind.com> --- (In reply to Marcel de Rooy from comment #13)
Sorry David, that was a dumb omission related to the change of ->search to scalar context. We need ->as_list currently. I updated the test plan to include choosing receiving/cataloging to make more clear what this patch is about.
Thanks for fixing and the updated test plan! Now signed off now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140701|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 141488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141488&action=edit Bug 29554: Do not hide display of itemtypes on neworderempty Hiding the list may lead to biblioitems.itemtype being NULL. We do not want that, since 942$c is mandatory. Test plan: Create basket and set 'create items when' to receiving or cataloging. Create order from new empty record. Check biblioitems.itemtype of created biblio. Without this patch, it would have been NULL like this: select biblionumber,title from biblio; | 7 | Test 3 | select biblionumber,itemtype from biblioitems; | 7 | NULL | Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> 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=29554 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com 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=29554 Martin Renvoize <martin.renvoize@ptfs-europe.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=29554 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Slava Shishkin <slavashishkin@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141488|0 |1 is obsolete| | --- Comment #19 from Slava Shishkin <slavashishkin@gmail.com> --- Created attachment 141873 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141873&action=edit Bug 29554: Do not hide display of itemtypes on neworderempty Hiding the list may lead to biblioitems.itemtype being NULL. We do not want that, since 942$c is mandatory. Test plan: Create basket and set 'create items when' to receiving or cataloging. Create order from new empty record. Check biblioitems.itemtype of created biblio. Without this patch, it would have been NULL like this: select biblionumber,title from biblio; | 7 | Test 3 | select biblionumber,itemtype from biblioitems; | 7 | NULL | Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.08 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #20 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.08 |22.11.00, 22.05.08, released in| |21.11.15 CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable --- Comment #21 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.15 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #22 from wainuiwitikapark@catalyst.net.nz --- Not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29554 Mathieu Saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38042 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38042 [Bug 38042] Wrong values in Item type form on acqui/neworderempty.pl -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org