When adding a document that does not use 010d as price document, but 071d, the price is not imported from koha since it only checks 010d and 345d. To reproduce: 1 - Create a Koha item, make sure there is neither 010d or 345d 2 - Add a 071d and fill a price 3 - Export the item as marcxml 4 - If you do not have one: in acquisition, create a vendor, a basket associated to this vendor, and a line associated to this vendor 5 - Add a line to any open basket, select: import "from a new file" and select the exported marcxml 6 - The price in 071 is not exported
Created attachment 175169 [details] [review] Bug 38619: UNIMARC prices should also be extracted from 071d When adding a document that does not use 010d as price document, but 071d, the price is not imported from koha since it only checks 010d and 345d. To reproduce: 1 - Create a Koha item, make sure there is neither 010d or 345d 2 - Add a 071d and fill a price 3 - Export the item as marcxml 4 - If you do not have one: in acquisition, create a vendor, a basket associated to this vendor, and a line associated to this vendor 5 - Add a line to any open basket, select: import "from a new file" and select the exported marcxml -> The price in 071 is not imported 6 - Apply patch 7 - Repeat 5 -> the price is properly imported
Does the function extract also price from 073$d and 072$d? It can be there too
For information, this 071 fied contains an editorial reference number that is not governed by an international standard. These numbers are generally used for sound recordings, printed music publications, videograms and electronic resources. The UNIMARC standard indicates that a $d is possible, with the same type of information as would be found in a 010$d for an ISBN. So it is legitimate do collect the price from this field. Question for Baptiste : what happens if a price is also present in 010 field, and if the 2 prices are not the same ?
All the field are parsed in the order of the array, so it will search the 345$d, if it doesn't find, it will search the 010$d. With this patch, after searching the 010$d, it will search the 071$d
The patch no longer applies: git bz apply 38619 Bug 38619 - UNIMARC prices should also be extracted from 071d 175169 - Bug 38619: UNIMARC prices should also be extracted from 071d Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 38619: UNIMARC prices should also be extracted from 071d Using index info to reconstruct a base tree... M C4/Biblio.pm Falling back to patching base and 3-way merge... Auto-merging C4/Biblio.pm CONFLICT (content): Merge conflict in C4/Biblio.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 38619: UNIMARC prices should also be extracted from 071d
Created attachment 182651 [details] [review] Bug 38619: UNIMARC prices should also be extracted from 071d When adding a document that does not use 010d as price document, but 071d, the price is not imported from koha since it only checks 010d and 345d. To reproduce: 1 - Create a Koha item, make sure there is neither 010d or 345d 2 - Add a 071d and fill a price 3 - Export the item as marcxml 4 - If you do not have one: in acquisition, create a vendor, a basket associated to this vendor, and a line associated to this vendor 5 - Add a line to any open basket, select: import "from a new file" and select the exported marcxml -> The price in 071 is not imported 6 - Apply patch 7 - Repeat 5 -> the price is properly imported
Created attachment 182712 [details] [review] Bug 38619: UNIMARC prices should also be extracted from 071d When adding a document that does not use 010d as price document, but 071d, the price is not imported from koha since it only checks 010d and 345d. To reproduce: 1 - Create a Koha item, make sure there is neither 010d or 345d 2 - Add a 071d and fill a price 3 - Export the item as marcxml 4 - If you do not have one: in acquisition, create a vendor, a basket associated to this vendor, and a line associated to this vendor 5 - Add a line to any open basket, select: import "from a new file" and select the exported marcxml -> The price in 071 is not imported 6 - Apply patch 7 - Repeat 5 -> the price is properly imported Signed-off-by: David Nind <david@davidnind.com>
I've signed off. When testing, I noted that: 1. The 071$d value (such as 50.00) needs the decimal places. 2. If there are no decimal places, for example just 50, then the value is not imported. This was the same behavour as 010$d and 345$d.