Bug 11273

Summary: Barcode generation hbyymmincr (AutoBarcode) in acquisitions is broken
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: chris, jonathan.druart, liz, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10890
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 11273: FIX barcode generation in acquisition if hbyymmincr
[Signed-off] Bug 11273: FIX barcode generation in acquisition if hbyymmincr
[PASSED QA] Bug 11273: FIX barcode generation in acquisition if hbyymmincr

Description Katrin Fischer 2013-11-19 22:16:02 UTC
When AutoBarcode is activated and you have set AcqCreateItem to 'on order' there is a Javascript error when you try to generate a barcode for the item:

TypeError: document.f is undefined
http://localhost:8080/intranet-tmpl/lib/jquery/jquery.js
Line 11

I am not sure if this used to work, but we shouldn't offer the plugin '...' and there should be no javascript errer. And ideally it should work :)
Comment 1 Jonathan Druart 2013-11-20 10:36:16 UTC
Katrin,
Please detail, I don't reproduce.
I set the AutoBarcode to incremental and when I go on acqui/neworderempty.pl?booksellerid=1&basketno=1 and click on the plugin link, the barcode field is correctly filled.
Moreover I don't get the JS error.
Comment 2 Katrin Fischer 2013-11-20 10:37:53 UTC
Hi Jonathan, 

aah, I think I know what happened - I used the filter with the branchcode. Does this work for you?
Comment 3 Jonathan Druart 2013-11-20 10:55:51 UTC
No, same error as you with the value "hbyymmincr".
Comment 4 Katrin Fischer 2013-11-20 10:59:03 UTC
So only the incrmental works?
Comment 5 Jonathan Druart 2013-11-20 11:07:15 UTC
No, only hbyymmincr does not work.
Comment 6 Katrin Fischer 2013-11-20 11:11:40 UTC
Ah, I misunderstood, thx for clarifying.
Comment 7 Katrin Fischer 2015-06-07 10:35:43 UTC
Still valid.
Comment 8 Jonathan Druart 2015-07-14 12:16:25 UTC Comment hidden (obsolete)
Comment 9 Marc Véron 2015-08-31 09:26:57 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2015-09-03 22:55:05 UTC
This improves the situation, but there is still a problem when you are creating more than one item - the plugin will always create the same barcode for each.
Comment 11 Katrin Fischer 2015-09-03 22:55:52 UTC
Created attachment 42372 [details] [review]
[PASSED QA] Bug 11273: FIX barcode generation in acquisition if hbyymmincr

When AutoBarcode is activated and you have set AcqCreateItem to 'on
order' there is a Javascript error when you try to generate a barcode
for the item:

TypeError: document.f is undefined
http://localhost:8080/intranet-tmpl/lib/jquery/jquery.js
Line 11

Test plan:
0/ a. Set AutoBarcode to hbyymmincr
   b. Set AcqCreateItem to 'on ordering'
   c. Set the plugin barcode.pl to the barcode field for the default
   and the ACQ frameworks
1/ Go on the add items page (cataloguing/additem.pl) and confirm that
the plugin works as expected.
2/ Go on the New order page (acqui/neworderempty.pl) and confirm that
the plugin works as expected.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Jonathan Druart 2015-09-04 07:34:37 UTC
(In reply to Katrin Fischer from comment #10)
> This improves the situation, but there is still a problem when you are
> creating more than one item - the plugin will always create the same barcode
> for each.

Is it a regression?
Comment 13 Katrin Fischer 2015-09-04 07:40:54 UTC
Nope - it's as before with the other - just annoying. That's why this passed QA :)
Comment 14 Jonathan Druart 2015-09-04 07:55:15 UTC
Yes but I meant: This has already worked before? in 3.18 for instance
Comment 15 Jonathan Druart 2015-09-04 08:41:24 UTC
(In reply to Jonathan Druart from comment #14)
> Yes but I meant: This has already worked before? in 3.18 for instance

Known bug, see bug 8425.
Comment 16 Tomás Cohen Arazi (tcohen) 2015-09-07 14:29:33 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 17 Chris Cormack 2015-09-22 01:48:30 UTC
Pushed to 3.20.x will be in 3.20.4
Comment 18 Liz Rea 2015-09-22 03:21:29 UTC
Pushed to 3.18.x will be in 3.18.11