[Bug 37265] New: Consideration of UniqueItemFields setting when receiving items in an order.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Bug ID: 37265 Summary: Consideration of UniqueItemFields setting when receiving items in an order. Change sponsored?: --- Product: Koha Version: 24.05 Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: dudzikmichal@wp.pl QA Contact: testopia@bugs.koha-community.org When using the Koha acquisition module to receive items (basket receiving an order), Koha does not consideration of UniqueItemFields setting. The problem is that you can accidentally attach 3 items to an order with the same values. -- 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=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dudzikmichal@wp.pl --- Comment #1 from Michal Dudzik <dudzikmichal@wp.pl> --- Created attachment 168559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168559&action=edit Add UniqueItemFields in orderreceive Test plan: 1) Set preferences UniqueItemFields: Public note (itemnotes) 2) Go to acquisition module 3) Create a basket with option Create items when: receiving an order 4) Add order to basket example from From a new (empty) record with Quantity: 3 or more 5) Close Basket 6) Receiving an order 7) Add Public note: TEST and receive first item (Add item) 8) You will see that next item have the same Public note 9) Apply this patch and repeat step 7 Sponsored-by: kohawbibliotece.pl -- 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=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Patch complexity|--- |Trivial patch -- 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=37265 Michal Dudzik <dudzikmichal@wp.pl> 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=37265 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Sandbox Version|24.05 |Main Assignee|koha-bugs@lists.koha-commun |dudzikmichal@wp.pl |ity.org | CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- Thanks for the patch Michal! I had a go at testing (using the koha-testing-docker development environment). I could replicate the problem that you identified (and by manually making the change in the patch, I can confirm that it fixes the problem you identified). Issue applying the patch ~~~~~~~~~~~~~~~~~~~~~~~~ However, I had an issue applying the patch. I don't know what this means or how to fix it: git bz apply 37265 Bug 37265 - Consideration of UniqueItemFields setting when receiving items in an order. 168559 - Add UniqueItemFields in orderreceive Apply? [(y)es, (n)o, (i)nteractive] y Traceback (most recent call last): File "/usr/bin/git-bz", line 2834, in <module> applied = do_apply(bug_ref) ^^^^^^^^^^^^^^^^^ File "/usr/bin/git-bz", line 1918, in do_apply users = bug.server.get_xmlrpc_proxy().User.get({'names': [patch.attacher]})['users'] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/xmlrpc/client.py", line 1122, in __call__ return self.__send(self.__name, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/xmlrpc/client.py", line 1464, in __request response = self.__transport.request( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/xmlrpc/client.py", line 1166, in request return self.single_request(host, handler, request_body, verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/xmlrpc/client.py", line 1178, in single_request http_conn = self.send_request(host, handler, request_body, verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/bin/git-bz", line 1239, in send_request connection.putheader("Cookie", cookie) ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'putheader' I'm assuming that this means the patch is not in the required format that then development environment expects. Feel free to post on this bug, or ask for help in the Development channel at https://chat.koha-community.org/ Koha development environment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most regular Koha developers use the koha-testing-docker development environment (https://gitlab.com/koha-community/koha-testing-docker) - if you need help setting that up, please ask in the Koha Community Chat > Development channel. Commit message guidelines ~~~~~~~~~~~~~~~~~~~~~~~~~ Also, the commit message needs to follow the guidelines at https://wiki.koha-community.org/wiki/Commit_messages If I was authoring the patch, I would format it similar to this: Bug 37265: Use UniqueItemFields settings for fields when receiving orders When using the acquisition module and receiving orders (where items are created when receiving an order), Koha does not consider the UniqueItemFields system preference settings for for fields when adding items. The problem is that the unique field values are copied to the next items received in the order, when they shouldn't be. Test plan: 1. Set preference UniqueItemFields: Public note (itemnotes) 2. Go to the acquisition module. 3. Create a basket with the option for "Create items when:" set to "receiving an order". 4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more. 5. Close the basket. 6. Receive the order. 7. Add a public note: TEST, and receive the first item (Add item). 8. You will see that the next item has the same public note. 9. Apply this patch and repeat step 7 - the public note is not used for the next note. Sponsored-by: kohawbibliotece.pl It can sometimes be a challenge getting a development environment setup, and I'd be happy to try and help you to get this to work (or alternatively, I can attach the patch to the bug in the format required). Changes to the bug information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I've added you as the assignee for this bug, and set the version to main (the release maintainer for 24.05 will review this bug once it is pushed to main by the release manager (after the quality assurance step is completed), and decide whether it should be added to 24.05). -- 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=37265 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The file attached is just a diff file not a patch - missing the header lines with the commit message and the bug number - I think this explains the error from git bz. Please let us know if we can help! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168559|0 |1 is obsolete| | --- Comment #4 from Michal Dudzik <dudzikmichal@wp.pl> --- Created attachment 168594 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168594&action=edit Add UniqueItemFields in orderreceive When using the Koha acquisition module to receive items (basket receiving an order), Koha does not consideration of UniqueItemFields setting. The problem is that you can accidentally attach 3 items to an order with the same values. Test plan: 1. Set preference UniqueItemFields: Public note (itemnotes) 2. Go to the acquisition module. 3. Create a basket with the option for 'Create items when:' set to receiving an order. 4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more. 5. Close the basket. 6. Receive the order. 7. Add a public note: TEST, and receive the first item (Add item). 8. You will see that the next item has the same public note. 9. Apply this patch and repeat step 7 - the public note is not used for the next note. Sponsored-by: kohawbibliotece.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168594|application/mbox |text/plain mime type| | Attachment #168594|0 |1 is patch| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This looks much better. Small but important: Subject: [PATCH] Bug 37265 - Consideration of UniqueItemFields setting when receiving items in an order Should be: Bug 37265: ... Another small thing: I think you created the patch manually and uploaded it here. Are you using koha-testing-docker? Have a look at git bz, it makes creating and handling the patch files with bugzilla much easier: https://wiki.koha-community.org/wiki/Git_bz_configuration -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168594|0 |1 is obsolete| | --- Comment #6 from Michal Dudzik <dudzikmichal@wp.pl> --- Created attachment 168607 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168607&action=edit Bug 37265: Consideration of UniqueItemFields setting when receiving items in an order Bug 37265: Use UniqueItemFields settings for fields when receiving orders When using the acquisition module and receiving orders (where items are created when receiving an order), Koha does not consider the UniqueItemFields system preference settings for for fields when adding items. The problem is that the unique field values are copied to the next items received in the order, when they shouldn't be. Test plan: 1. Set preference UniqueItemFields: Public note (itemnotes) 2. Go to the acquisition module. 3. Create a basket with the option for "Create items when:" set to "receiving an order". 4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more. 5. Close the basket. 6. Receive the order. 7. Add a public note: TEST, and receive the first item (Add item). 8. You will see that the next item has the same public note. 9. Apply this patch and repeat step 7 - the public note is not used for the next note. Sponsored-by: kohawbibliotece.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168607|0 |1 is obsolete| | --- Comment #7 from Michal Dudzik <dudzikmichal@wp.pl> --- Created attachment 168608 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168608&action=edit Bug 37265: Consideration of UniqueItemFields setting when receiving items in an order When using the acquisition module and receiving orders (where items are created when receiving an order), Koha does not consider the UniqueItemFields system preference settings for for fields when adding items. The problem is that the unique field values are copied to the next items received in the order, when they shouldn't be. Test plan: 1. Set preference UniqueItemFields: Public note (itemnotes) 2. Go to the acquisition module. 3. Create a basket with the option for "Create items when:" set to "receiving an order". 4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more. 5. Close the basket. 6. Receive the order. 7. Add a public note: TEST, and receive the first item (Add item). 8. You will see that the next item has the same public note. 9. Apply this patch and repeat step 7 - the public note is not used for the next note. Sponsored-by: kohawbibliotece.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 --- Comment #8 from Michal Dudzik <dudzikmichal@wp.pl> --- David, thank you for the information. They helped me a lot. I think I've already uploaded the patch according to community guidelines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 --- Comment #9 from Michal Dudzik <dudzikmichal@wp.pl> --- Katrin, thank you for your tips. I currently work locally. Next time I will use git-bz. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.01,23.11.06,23.05.12 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Michal Dudzik <dudzikmichal@wp.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.01,23.11.06,23.05.12 | released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 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=37265 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168608|0 |1 is obsolete| | --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 168638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168638&action=edit Bug 37265: Consideration of UniqueItemFields setting when receiving items in an order When using the Koha acquisition module to receive items (basket receiving an order), Koha does not consideration of UniqueItemFields setting. The problem is that you can accidentally attach 3 items to an order with the same values. Test plan: 1. Set preference UniqueItemFields: Public note (itemnotes) 2. Go to the acquisition module. 3. Create a basket with the option for 'Create items when:' set to receiving an order. 4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more. 5. Close the basket. 6. Receive the order. 7. Add a public note: TEST, and receive the first item (Add item). 8. You will see that the next item has the same public note. 9. Apply this patch and repeat step 7 - the public note is not used for the next note. Sponsored-by: kohawbibliotece.pl 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=37265 --- Comment #11 from David Nind <david@davidnind.com> --- Thanks Michal! Good luck with h equality assurance (QA) stage. There is a bit of a backlog at the moment for the QA Team (180), so it may take a while to get through. David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Lucas Gass <lucas@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=37265 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168638|0 |1 is obsolete| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 171949 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171949&action=edit Bug 37265: Consideration of UniqueItemFields setting when receiving items in an order When using the Koha acquisition module to receive items (basket receiving an order), Koha does not consideration of UniqueItemFields setting. The problem is that you can accidentally attach 3 items to an order with the same values. Test plan: 1. Set preference UniqueItemFields: Public note (itemnotes) 2. Go to the acquisition module. 3. Create a basket with the option for 'Create items when:' set to receiving an order. 4. Add an order to the basket, for example: From a new (empty) record with the Quantity set to 3 or more. 5. Close the basket. 6. Receive the order. 7. Add a public note: TEST, and receive the first item (Add item). 8. You will see that the next item has the same public note. 9. Apply this patch and repeat step 7 - the public note is not used for the next note. Sponsored-by: kohawbibliotece.pl Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |lucas@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=37265 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.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=37265 --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.06 released in| | Status|Pushed to main |Pushed to stable --- Comment #14 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes receiving orders release notes| |so that values added to | |fields selected in the | |UniqueItemFields system | |preference are treated as | |unique when receiving | |items. | | | |Example of | |incorrect behavour that is | |fixed: | |- For the | |UniqueItemFields system | |preference, the Public note | |(itemnotes) is set as | |unique. | |- Multiple | |quantities of the same item | |are ordered. | |- When | |receiving the order, a note | |is added to the public note | |for the first copy of item | |received. | |- For the second | |copy of the item received, | |the public note from the | |first item was incorrectly | |added. Summary|Consideration of |Consideration of |UniqueItemFields setting |UniqueItemFields setting |when receiving items in an |when receiving items in an |order. |order -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldoldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #16 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org