https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37265

David Nind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |Sandbox
            Version|24.05                       |Main
           Assignee|[email protected] |[email protected]
                   |ity.org                     |
                 CC|                            |[email protected]

--- Comment #2 from David Nind <[email protected]> ---
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to