Bug 9480 - Set barcode width and height configurable with system preferences in patron card creator
Summary: Set barcode width and height configurable with system preferences in patron c...
Status: RESOLVED DUPLICATE of bug 14107
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: unspecified
Hardware: All All
: P2 trivial (vote)
Assignee: Vitor Fernandes
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-24 10:48 UTC by Vitor Fernandes
Modified: 2017-04-20 19:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9480: Set barcode width and height configurable with system preferences in patron card creator (5.16 KB, patch)
2013-01-24 10:59 UTC, Vitor Fernandes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor Fernandes 2013-01-24 10:48:03 UTC
Problem:

- barcode width scale is always set to 0.8 of the total width
- barcode height scale is always set to 0.01 of total height
- happens in 3.8.X, 3.10.X and master code

Solution:

- create a system preference to control width scale name BarcodeWidthScale (default: 0.8)
- create a system preference to control height scale name BarcodeHeightScale (default: 0.01)
- change Patroncard.pm to use the variables instead of the default values (if the sysprefs are empty uses the default values).
Comment 1 Vitor Fernandes 2013-01-24 10:59:11 UTC
Created attachment 14812 [details] [review]
Bug 9480: Set barcode width and height configurable with system preferences in patron card creator

Problem:

- barcode width scale is always set to 0.8 of the total width
- barcode height scale is always set to 0.01 of total height
- happens in 3.8.X, 3.10.X and master code

Test plan:

- Apply patch
- Check if your patron cards still prints normally
- Change the sysprefs BarcodeWidthScale and BarcodeHeightScale (double values) and see the barcode change
- Remove the sysprefs value (empty) and your patron cards should print normally (uses the default values)

Sponsored-by: KEEP SOLUTIONS
Comment 2 Owen Leonard 2013-02-05 20:41:39 UTC
I don't know much about the patron card creator, but is there a reason why these values belong in a system preference rather than as part of a layout?
Comment 3 Vitor Fernandes 2013-02-05 22:02:51 UTC
Hi Owen,

They are in a system preference because they are fixed in the code and can't be changed in the layout. So I created tão system preferences for the barcode height and width scale.
Comment 4 Owen Leonard 2013-02-06 14:53:29 UTC
I understand that the values are fixed in the code at the moment. My question is whether these values are something that should be added to the layout configuration form: /cgi-bin/koha/patroncards/edit-layout.pl?op=edit&element_id=20. That form lets you choose font settings, barcode offset, etc. Shouldn't barcode height and width be configured there?
Comment 5 Vitor Fernandes 2013-02-06 15:01:37 UTC
Hi Owen,

The height and width of barcode are automatically calculated by Koha.
Comment 6 Kyle M Hall 2013-02-08 17:06:34 UTC
Vitor, 

I'm not sure you understood Owen's question correctly. We think that instead of the height and width being set at the system wide level, they should be set in the same place you set font settings, barcode offset, etc. ( that is, in patroncards/edit-layout.pl ). I agree with Owen that this would be a better solution.

(In reply to comment #5)
> Hi Owen,
> 
> The height and width of barcode are automatically calculated by Koha.
Comment 7 Liz Rea 2013-03-13 20:41:06 UTC
I agree too - these settings should be set within the tool and not as a global preference.
Comment 8 Marc Véron 2015-05-02 06:14:49 UTC
Bug 14107 exposes the scaling values in the layout editor.
Comment 9 Marc Véron 2017-04-20 19:24:51 UTC

*** This bug has been marked as a duplicate of bug 14107 ***