Bug 32166: Use import record id for retrieving correct inputs
authorNick Clemens <nick@bywatersolutions.com>
Thu, 10 Nov 2022 20:11:58 +0000 (20:11 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 16 Nov 2022 17:29:01 +0000 (14:29 -0300)
commit7d31f77ae6d1f136c58e55fa06139ac366fc6b85
tree4569014baf50b3d2feba8334c4728e52e4d5ac9c
parent85791f4abab19d0b1a7f73d8fbec2d0043d5d871
Bug 32166: Use import record id for retrieving correct inputs

When importing from a staged file we retrieve the records form the DB, skip any that are not selected,
and process the rest.

When we skip some, we still raise our record count, and use this to retrieve the inputs.

When building the page, we don't increment for skipped reocrds, so there can be a mismatch, i.e.
Record #1 on the page to add records may be the 3rd record in the import file

Rather than using a counting system, let us use the import record id directly

To test:
 0 - Set system preferences:

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

 1 - Stage attached sample file, Format:MARCXML, Record matching:Koha biblio 999$c
 2 - Add to a basket from the staged file
 3 - Select 1st record to basket and save
 4 - Record is added with the fields above as expected
 5 - Add to basket again, select 2nd record
 6 - Record is added with price from 020a, ignoring incoming fields
 7 - Repeat with 3rd, same problem
 8 - Apply patch
 9 - Stage file and repeat step 3
10 - Confirm added with correct values
11 - Add 2nd record and save, values correct
12 - Add 3rd record, values correct

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
acqui/addorderiso2709.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt