When a basket has orders transferred from another basket we do this: [% IF (books_loo.transferred_from) %] [% basket = books_loo.transferred_from.basket %] [% bookseller = books_loo.transferred_from.bookseller %] [% timestamp = books_loo.transferred_from.timestamp %] But later when building the 'Add to basket' modal - we have this: <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true" data-basketno="[% basket.basketname | html %]"> We are using the wrong basket now to pull info
To recreate: 1 - Create a new basket - 'Gonna transfer' 2 - Add an order to the basket 3 - Create another basket 'Has the transfer' 4 - Return to first basket and transfer order to second 5 - Return to second basket, click 'Add to basket' and inspect the modal 6 - Note basketno says 'Gonna transfer' It should have correct name, and maybe be renamed to 'basketname'
I have changes for this but am running into some errors trying to attach my patch. Traceback (most recent call last): File "/usr/bin/git-bz", line 2845, in <module> do_attach(*args) File "/usr/bin/git-bz", line 2171, in do_attach add_url(bug, commits) File "/usr/bin/git-bz", line 1719, in add_url add_url_to_head_commit(commit, bug) File "/usr/bin/git-bz", line 1682, in add_url_to_head_commit git.commit(file="-", amend=True, _input=input) File "/usr/bin/git-bz", line 197, in f o = git_run(command, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/bin/git-bz", line 167, in git_run output, error = process.communicate(input) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 1207, in communicate stdout, stderr = self._communicate(input, endtime, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 2039, in _communicate input_view = memoryview(self._input) ^^^^^^^^^^^^^^^^^^^^^^^ I tried doing a fresh ktd pull but still the same error.
Created attachment 177978 [details] [review] Bug 39029: When a basket contains an order transferred from another basket some info is incorrect. To test: 1 - Create a new basket - 'Gonna transfer' 2 - Add an order to the basket 3 - Create another basket 'Has the transfer' 4 - Return to first basket and transfer order to second 5 - Return to second basket, click 'Add to basket' and inspect the modal 6 - Note basketno says 'Gonna transfer' 7 - apply the patch 8 - redo steps 1 through 6 with fresh baskets and the modal should have the correct values