Bug 35254 - Adding files to basket from a staged file uses wrong inputs for order information when not all records are selected
Summary: Adding files to basket from a staged file uses wrong inputs for order informa...
Status: REOPENED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords: rel_22_11_candidate
Depends on:
Blocks:
 
Reported: 2023-11-03 17:56 UTC by Nick Clemens (kidclamp)
Modified: 2024-01-03 11:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.06,22.11.13


Attachments
Bug 35254: Add import_record_id to order inputs (10.68 KB, patch)
2023-11-03 20:12 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 35254: Add import_record_id to order inputs (10.73 KB, patch)
2023-11-04 12:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35254: Add import_record_id to order inputs (10.79 KB, patch)
2023-11-06 20:55 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 35254: [22.11.x] Add import_record_id to order inputs (10.67 KB, patch)
2023-12-11 15:23 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2023-11-03 17:56:36 UTC
Bug 32166 fixed the issue of items and inputs not matching up for item level details, however, the problem still exists for order level information

To recreate:
1 - Find a vendor in acquisitions
2 - Create or find an open basket
3 - Add to basket form a new file
4 - Stage file and add to basket
5 - Select the second record in the list
6 - Enter price info
7 - Save (don't forget, you need to set item type in the second tab)
8 - The order has no price info!
Comment 1 Nick Clemens (kidclamp) 2023-11-03 20:12:59 UTC
Created attachment 158366 [details] [review]
Bug 35254: Add import_record_id to order inputs

This patch follows the logic of bug 32166 and adds specific inputs for each order to avoid any misalignment when some records are not imported

To test:
1 - Find a vendor in acquisitions
2 - Create or find an open basket
3 - Add to basket form a new file
4 - Stage file and add to basket
5 - Select the second record in the list
6 - Enter price info
7 - Save (don't forget, you need to set item type in the second tab)
8 - The order has no price info!
9 - Apply patch
10 - Repeat 3-7 above, staging file fresh
11 - Confirm order has correct prices
12 - Test with a file with many records
13 - Confirm any combination of choosing/skipping records works as expected
Comment 2 Katrin Fischer 2023-11-04 12:07:33 UTC
Created attachment 158374 [details] [review]
Bug 35254: Add import_record_id to order inputs

This patch follows the logic of bug 32166 and adds specific inputs for each order to avoid any misalignment when some records are not imported

To test:
1 - Find a vendor in acquisitions
2 - Create or find an open basket
3 - Add to basket form a new file
4 - Stage file and add to basket
5 - Select the second record in the list
6 - Enter price info
7 - Save (don't forget, you need to set item type in the second tab)
8 - The order has no price info!
9 - Apply patch
10 - Repeat 3-7 above, staging file fresh
11 - Confirm order has correct prices
12 - Test with a file with many records
13 - Confirm any combination of choosing/skipping records works as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Katrin Fischer 2023-11-04 12:08:02 UTC
I really wonder why we didn't stumble on this much sooner?
Comment 4 Victor Grousset/tuxayo 2023-11-06 18:54:00 UTC
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt
Auto-merging acqui/addorderiso2709.pl
CONFLICT (content): Merge conflict in acqui/addorderiso2709.pl

Not trivial for addorderiso2709.tt
Comment 5 Victor Grousset/tuxayo 2023-11-06 19:14:39 UTC
My bad, was trying to apply bug 32166 which is why I wasn't finding the last commit were it applies well. Continuing review.
Comment 6 Victor Grousset/tuxayo 2023-11-06 20:55:58 UTC
Created attachment 158565 [details] [review]
Bug 35254: Add import_record_id to order inputs

This patch follows the logic of bug 32166 and adds specific inputs for each order to avoid any misalignment when some records are not imported

To test:
1 - Find a vendor in acquisitions
2 - Create or find an open basket
3 - Add to basket form a new file
4 - Stage file and add to basket
5 - Select the second record in the list
6 - Enter price info
7 - Save (don't forget, you need to set item type in the second tab)
8 - The order has no price info!
9 - Apply patch
10 - Repeat 3-7 above, staging file fresh
11 - Confirm order has correct prices
12 - Test with a file with many records
13 - Confirm any combination of choosing/skipping records works as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 7 Victor Grousset/tuxayo 2023-11-06 20:58:51 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)

---

(In reply to Katrin Fischer from comment #3)
> I really wonder why we didn't stumble on this much sooner?

Indeed!
Comment 8 Tomás Cohen Arazi 2023-11-08 20:55:34 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 9 Fridolin Somers 2023-11-11 07:08:45 UTC
Pushed to 23.05.x for 23.05.06
Comment 10 Nick Clemens (kidclamp) 2023-12-11 14:57:41 UTC
Any reason this was not backported to 22.11?
Comment 11 Nick Clemens (kidclamp) 2023-12-11 15:23:34 UTC
Created attachment 159713 [details] [review]
Bug 35254: [22.11.x] Add import_record_id to order inputs

This patch follows the logic of bug 32166 and adds specific inputs for each order to avoid any misalignment when some records are not imported

To test:
1 - Find a vendor in acquisitions
2 - Create or find an open basket
3 - Add to basket form a new file
4 - Stage file and add to basket
5 - Select the second record in the list
6 - Enter price info
7 - Save (don't forget, you need to set item type in the second tab)
8 - The order has no price info!
9 - Apply patch
10 - Repeat 3-7 above, staging file fresh
11 - Confirm order has correct prices
12 - Test with a file with many records
13 - Confirm any combination of choosing/skipping records works as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 12 Frédéric Demians 2023-12-13 11:26:57 UTC
Pushed to 22.11.x for 22.11.13