Bug 19325 - Enable padding of printed barcodes
Summary: Enable padding of printed barcodes
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Charles Farmer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-15 15:07 UTC by David Bourgault
Modified: 2020-11-17 20:06 UTC (History)
5 users (show)

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


Attachments
Bug 19325 - Add an option to pad barcode length (3.64 KB, patch)
2017-09-15 15:16 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19325 - Adds an option to pad barcode length (3.64 KB, patch)
2017-09-15 15:17 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19325 - Add an option to pad barcode length (3.77 KB, patch)
2017-10-20 04:15 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 19325: (QA follow-up) Remove a syspref, change the backend accordingly (3.66 KB, patch)
2018-08-08 19:15 UTC, Charles Farmer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Bourgault 2017-09-15 15:07:16 UTC
Small enhancement which would provide an option to pad the length of barcodes printed to PDF with a custom character.
Comment 1 David Bourgault 2017-09-15 15:16:33 UTC Comment hidden (obsolete)
Comment 2 David Bourgault 2017-09-15 15:17:26 UTC Comment hidden (obsolete)
Comment 3 Chris Nighswonger 2017-09-15 15:45:52 UTC
Perhaps a description of a use case or two might be beneficial to the end user.
Comment 4 Chris Nighswonger 2017-09-15 15:46:28 UTC
I'm sure it would help Nicole with the documentation of it.
Comment 5 Katrin Fischer 2017-09-15 21:19:20 UTC
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
Comment 6 David Bourgault 2017-09-26 15:14:08 UTC
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.
Comment 7 Mark Tompsett 2017-10-20 03:58:52 UTC
Why have an enabled AND length? If the length is 0, then what is the point of enabled?
Comment 8 Alex Buckley 2017-10-20 04:15:32 UTC
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>
Comment 9 Julian Maurice 2018-01-12 13:34:11 UTC
Why new system preferences ? Shouldn't it be configurable at the layout level ?
Comment 10 Katrin Fischer 2018-02-07 07:12:55 UTC
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?
Comment 11 Charles Farmer 2018-08-08 19:15:58 UTC
Created attachment 77591 [details] [review]
Bug 19325: (QA follow-up) Remove a syspref, change the backend accordingly
Comment 12 Charles Farmer 2018-08-08 19:16:40 UTC
(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.
Comment 13 Liz Rea 2019-04-16 17:25:43 UTC
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
Comment 14 Charles Farmer 2019-10-02 19:02:50 UTC
> 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.