Bug 31717: Value builder unimarc_field_010.pl also use 214$c

Value builder unimarc_field_010.pl tries to find publisher from ISBN in order to fill 210$c.
Since there is now 214$c for publisher this value builder should be adapted.
214 is more important than 210 so if there are both, only 214 will be filled.

Test plan :
1) Choose an existing record with an ISBN and a published in biblioitems.publishercode,
   For example 9782070612369 and Gallimard
2) Use value builder unimarc_field_010.pl on 010$a
3) Create a new record
4) Enter 9782070612369 in 010$a
5) Click on value builder icon on this subfield
6) Check you see 'Gallimard' in 214$c

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Fridolin Somers 2022-10-07 10:19:35 -10:00 committed by Martin Renvoize
parent 911fdc330c
commit c10e7a67df
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
1 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,13 @@ sub plugin_javascript {
req.done(function(resp){
var elems = document.getElementsByTagName('input');
for( i = 0 ; elems[i] ; i++ )
{
if(elems[i].id.match(/^tag_214_subfield_c/)) {
elems[i].value = resp;
return 1;
}
}
for( i = 0 ; elems[i] ; i++ )
{
if(elems[i].id.match(/^tag_210_subfield_c/)) {
elems[i].value = resp;