Bug 9992

Summary: Barcode generated without a branchcode
Product: Koha Reporter: Chad Billman <chad>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: chad, colin.campbell, katrin.fischer
Version: 3.10   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Chad Billman 2013-04-05 13:46:17 UTC
When receiving a serial with autobarcode set to <branchcode>yymm0001 the automatically generated barcode is missing the branchcode. 

When focusing on the barcode field the javascript inserts "13041297" instead of "CM13041297". The behavior is the same in both firefox and chrome.

Our librarian is reporting this worked correctly in an earlier version of 3.10.x but stopped working with the recent upgrade to 3.10.4.
Comment 1 Chad Billman 2013-04-09 13:40:41 UTC
It appears the javascript is looping over all the form fields to find the home branch including the supplemental issue. Since the supplemental issue comes later in the form the javascript pulls the location from that field. 

I confirmed that setting the permanent location on the supplemental issue causes the javascript to generate the proper barcode. 

It seems the javascript is generated by C4/Barcodes/ValueBuilder.pm. Any thoughts on how to patch it?
Comment 2 Katrin Fischer 2015-01-06 20:14:38 UTC
This appears to work correctly in current master.