Description
Jesse Maseto
2013-08-19 14:06:15 UTC
Hello, Is this issue confirmed as a bug. We are also facing this issue in Koha 3.14.05.? Any timeline of getting this resolved? Is anyone working on this? Regards, Binu Hello, Is this issue confirmed as a bug. We are also facing this issue in Koha 3.14.05.? Any timeline of getting this resolved? Is anyone working on this? Regards, Binu Currently generated barcodes are images produced using GD::Barcode. It's not possible to set font size for numbers. Hi, It is true that the options to change the size of the barcode is non functional. However, while exporting the batch if you choose 'spine label' in the 'Template' option and Barcode in the 'layout' option the size of the barcode increases. But this disturbs the printing set up if you are using specific labels for printing the barcodes. -Rajeshwari I fixed it for patron cards, there could be a similar solution for labels, but there is som more work necessary. Bug 14107 - Patron cards: Make barcode width and height scaling editable See also comment #1 on Bug 14149 - Labels: Make barcode width and height scaling editable Still valid on 20.05 Marjorie Created attachment 127729 [details] [review] Bug 10762: Change the size of barcodes in label creator Test plan: 1)Home > Tools > Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.04), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Created attachment 134754 [details] [review] Bug 10762: Change the size of barcodes in label creator Test plan: 1)Home > Tools > Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.04), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Owen Leonard <oleonard@myacpl.org> Please submit reports under your own name. Change assignee field. (In reply to Marcel de Rooy from comment #9) > Please submit reports under your own name. Change assignee field. I changed the assignee. + scale_height => 0.02, Not 0.01 here? I believe this actually fixes something different than originally reported. This makes it possible to pick the size of the barcode, the original was a bug saying that the font size was not taken into account for the barcode number shown below the barcode. I've filed a new bug and reset this as enh, because it's a nice new feature now. Bug 30819 - Not able to adjust size of barcode numbers 1) QA test tools: FAIL installer/data/mysql/atomicupdate/update-BZ_10762.pl FAIL file permissions File must have the exec flag 2) See comment#11, it looks like the original value was 0.01: + scale_height => 0.02, - my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height 3) Defaults Just a question, maybe someone else can answer that one too: The patch adds the 2 new database columns with defaults 0.02 and 0.8 in the database and also sets the defaults in new. Should we do both or would one option suffice? 4) Changes to kohastructure.sql are missing *** Bug 14149 has been marked as a duplicate of this bug. *** Created attachment 144900 [details] [review] Bug 10762: (follow-up) Update test plan, add kohastructure.sql files I also change the default value for scale_height to '0.01' Test plan: 1)Home > Cataloguing > Tools: Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.02), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger (In reply to Katrin Fischer from comment #13) > 1) QA test tools: > > FAIL installer/data/mysql/atomicupdate/update-BZ_10762.pl > FAIL file permissions > File must have the exec flag > > 2) See comment#11, it looks like the original value was 0.01: > > + scale_height => 0.02, > > - my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # > this scales the barcode height to 10% of the label height > > 3) Defaults > > Just a question, maybe someone else can answer that one too: > > The patch adds the 2 new database columns with defaults 0.02 and 0.8 in the > database and also sets the defaults in new. > > Should we do both or would one option suffice? > > 4) Changes to kohastructure.sql are missing Hello Katrin, Normally I fixed this things on my last 'push' For default value (repeat in sql and view on 'sub new()' I'm not an expert but it like the same than 'layout_name' for example (set to 'DEFAULT' in default sql value and also in the template when we passed vars). I hope this will be okay for everyone :) Created attachment 144933 [details] [review] Bug 10762: (follow-up) Add exec right on atomic update file https://bugs.koha-community.org/show_bug.cgi?id=17062 I forgot this file, fixed and push Created attachment 144939 [details] [review] Bug 10762: Change the size of barcodes in label creator Test plan: 1)Home > Tools > Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.04), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 144940 [details] [review] Bug 10762: (follow-up) Update test plan, add kohastructure.sql files I also change the default value for scale_height to '0.01' Test plan: 1)Home > Cataloguing > Tools: Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.02), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 144941 [details] [review] Bug 10762: (follow-up) Add exec right on atomic update file https://bugs.koha-community.org/show_bug.cgi?id=17062 Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> First observation: Normally when we modify modules, we need to add unit tests. Unfortunately here I cant find any test yet for e.g. C4/Creators/Layout.pm. You could do for C4::Labels::Label though. Rest looks good to me. Created attachment 154456 [details] [review] Bug 10762: Change the size of barcodes in label creator Test plan: 1)Home > Tools > Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.04), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 154457 [details] [review] Bug 10762: (follow-up) Update test plan, add kohastructure.sql files I also change the default value for scale_height to '0.01' Test plan: 1)Home > Cataloguing > Tools: Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.02), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 154458 [details] [review] Bug 10762: (follow-up) Add exec right on atomic update file https://bugs.koha-community.org/show_bug.cgi?id=17062 Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 154459 [details] [review] Bug 10762: (follow-up) Add tests Created attachment 154559 [details] [review] Bug 10762: Change the size of barcodes in label creator Test plan: 1)Home > Tools > Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.04), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Created attachment 154560 [details] [review] Bug 10762: (follow-up) Update test plan, add kohastructure.sql files I also change the default value for scale_height to '0.01' Test plan: 1)Home > Cataloguing > Tools: Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.02), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Created attachment 154561 [details] [review] Bug 10762: (follow-up) Add exec right on atomic update file https://bugs.koha-community.org/show_bug.cgi?id=17062 Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Created attachment 154562 [details] [review] Bug 10762: (follow-up) Add tests Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Worked as designed. Works as described. Created attachment 157168 [details] [review] Bug 10762: Change the size of barcodes in label creator Test plan: 1)Home > Tools > Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.04), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 157169 [details] [review] Bug 10762: (follow-up) Update test plan, add kohastructure.sql files I also change the default value for scale_height to '0.01' Test plan: 1)Home > Cataloguing > Tools: Label creator > Manage Layout or New Layout 2)Make a new layout or edit an existing one 3)Notice the 2 new fields "Barcode width/Barcode height" 4)Save it like this 5)Create a batch of barcode and export if in PDF 6)Notice the size of barcode 7)Go back to your existing layout 8)Enter some values (Barcode width: 1.6 / Barcode height: 0.02), save 9)Take back your batch of barcode and export it in PDF 10)The barcode should be 2x bigger Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 157170 [details] [review] Bug 10762: (follow-up) Add exec right on atomic update file https://bugs.koha-community.org/show_bug.cgi?id=17062 Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 157171 [details] [review] Bug 10762: (follow-up) Add tests Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 157172 [details] [review] Bug 10762: (QA follow-up) Perltidy Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 23.11. Nice work everyone, thanks! Enhancement not pushed to 23.05.x Hey, this broke tests. Please provide a fix ASAP. https://jenkins.koha-community.org/job/Koha_Master/lastCompletedBuild/testReport/ Please fix the tests or I will need to revert this from master. Created attachment 157999 [details] [review] Bug 10762: Fix default values test This patch adds the new default values to the data structure the result is compared with. It also fixes the tests count (probably an untested rebase issue) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> I fixed the first trivial case. One failing test remains. Created attachment 158014 [details] [review] Bug 10762: Fix tests continued Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (In reply to Tomás Cohen Arazi from comment #43) > I fixed the first trivial case. One failing test remains. Done. (In reply to Tomás Cohen Arazi from comment #45) > (In reply to Tomás Cohen Arazi from comment #43) > > I fixed the first trivial case. One failing test remains. > > Done. Thank you, Tomas! When I was documenting this, I was unable to figure out what 0.01 in the barcode height means. Code says it's 10% of the label height but mathematically it doesn't make sense (I'm not the best at math, but I think 10% is 0.1, not 0.01), and in reality the barcode looks taller than 10% of the label. It looks more like 20%? (de visu, I could probably fit 5 barcodes stacked one on top of the other on one label at that height.) I also tried a value of 1 and it's waaaay over the height of the label, but not 100% of the page either, it's like 1/2 to 2/3 of the page. In addition to Caroline's comment, it may be a good idea to add measurement units and examples to Barcode width/Barcode height parameters in the tool. Seems I had forgotten to change the status. It is already documented. |