Small enhancement which would provide an option to pad the length of barcodes printed to PDF with a custom character.
Created attachment 67149 [details] [review] Bug 19325 - Add an option to pad barcode length Inserts a small change to C4::Label::barcode() Test case: 1) Apply patch 2) Run updatedatabase.pl 3) Print some barcodes to PDF. They should look as usual. 4) Go in systempreferences and enable "BarcodePaddingEnable". Set the a length and a character. 5) Print some barcodes to PDF. They should now be of fixed length.
Created attachment 67150 [details] [review] Bug 19325 - Adds an option to pad barcode length Inserts a small change to C4::Label::barcode() Test case: 1) Apply patch 2) Run updatedatabase.pl 3) Print some barcodes to PDF. They should look as usual. 4) Go in systempreferences and enable "BarcodePaddingEnable". Set the a length and a character. 5) Print some barcodes to PDF. They should now be of fixed length.
Perhaps a description of a use case or two might be beneficial to the end user.
I'm sure it would help Nicole with the documentation of it.
Hi Chris, I agree about the use cases. I am tagging this with keyword "Manual" in hope someone will submit a patch to the manual. Instructions can be found here: https://wiki.koha-community.org/wiki/Editing_the_Koha_Manual
The main use case I had in mind when developping this patch is to add the option to standardize barcode length when printing a range (Bug 7468). Short barcodes can give very ugly results when printed as Code39, this helps fix that.
Why have an enabled AND length? If the length is 0, then what is the point of enabled?
Created attachment 68308 [details] [review] Bug 19325 - Add an option to pad barcode length Inserts a small change to C4::Label::barcode() Test case: 1) Apply patch 2) Run updatedatabase.pl 3) Print some barcodes to PDF. They should look as usual. 4) Go in systempreferences and enable "BarcodePaddingEnable". Set the a length and a character. 5) Print some barcodes to PDF. They should now be of fixed length. Followed test plan patch worked as described, also passed QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Why new system preferences ? Shouldn't it be configurable at the layout level ?
I agree with Julian that it would be cleaner to keep all the configuration options for the labels within the layouts. So far only the options for the quick label print are in prefs, so this would be a first one too. Alex, could you take a look at the comments please and give us some feedback?
Created attachment 77591 [details] [review] Bug 19325: (QA follow-up) Remove a syspref, change the backend accordingly
(In reply to M. Tompsett from comment #7) > Why have an enabled AND length? If the length is 0, then what is the point > of enabled? I agree with you, we definitely could get rid of the property if the BarcodePaddingLength's description makes it clear that a value of 0 disables that part of the code. (In reply to Julian Maurice from comment #9) > Why new system preferences ? Shouldn't it be configurable at the layout > level ? It depends. If you have multiple employees doing this repeatedly, and you wanna make sure everything prints out the same way every time, it makes sense to offer a syspref instead of forcing users to enter values over and over, especially if the defaults aren't what they need. Usability-wise, I think there's merit to the sysprefs, but I can see why someone who prints barcodes once every blue moon wouldn't want to clutter its database with additional preferences. --- I did an in-between for now: removed the BarcodePaddingEnable pref, and changed the BarcodePaddingLength's description to imply that a value of 0 disables padding. If you say three times that the sysprefs have to go, I'll make it configurable at the template level.
Hi, This is much better handled at the template level. We don't want to give syspref permissions to the volunteer who prints labels. Does once suffice for your three times requirement? I don't want to be rude. :) Cheers, Liz
> This is much better handled at the template level. We don't want to give syspref permissions to the volunteer who prints labels. But I'm not asking you to, I'm saying that most libraries we work with have a systematic approach to printing barcodes. They configure it once and forget about it, I don't understand which use case you're describing where every barcode printed has to be padded differently.