Bug 9992 - Barcode generated without a branchcode
Summary: Barcode generated without a branchcode
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-05 13:46 UTC by Chad Billman
Modified: 2015-12-03 22:00 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.