Summary: | Units doesn't get saved usefully for patroncards | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Label/patron card printing | Assignee: | Chris Nighswonger <cnighswonger> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | chris, derrynj, jonathan.druart, mtj, tomascohen |
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18246 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Bug 14366 - Units doesn't get saved usefully for patroncards
[SIGNED OFF] Bug 14366 - Units doesn't get saved usefully for patroncards Bug 14366 - Units doesn't get saved usefully for patroncards |
Description
David Cook
2015-06-09 04:23:44 UTC
Created attachment 40010 [details] [review] Bug 14366 - Units doesn't get saved usefully for patroncards This patch causes the "Units" to be saved and displayed correctly for the "Edit layout" screen in Patroncards. _TEST PLAN_ Before applying: 0) Create a new layout 1) Edit the layout, change the units, and click Save 2) Edit the layout again, and notice the units are still "PostScript Points" Apply the patch: 3) Edit the layout again, change the units, and click Save 4) Edit the layout again, note that the units have changed to your selection 5) Rejoice Of course... I'm not sure that the actual label creator is using the different units... that's fun... (In reply to David Cook from comment #2) > Of course... I'm not sure that the actual label creator is using the > different units... that's fun... User selected units are converted to postscript points before rendering. Postscript points are the common denominator. *** Bug 8602 has been marked as a duplicate of this bug. *** Created attachment 40085 [details] [review] [SIGNED OFF] Bug 14366 - Units doesn't get saved usefully for patroncards This patch causes the "Units" to be saved and displayed correctly for the "Edit layout" screen in Patroncards. _TEST PLAN_ Before applying: 0) Create a new layout 1) Edit the layout, change the units, and click Save 2) Edit the layout again, and notice the units are still "PostScript Points" Apply the patch: 3) Edit the layout again, change the units, and click Save 4) Edit the layout again, note that the units have changed to your selection 5) Rejoice Signed-off-by: Nick Clemens <nick@quecheelibrary.org> (In reply to Chris Nighswonger from comment #3) > (In reply to David Cook from comment #2) > > Of course... I'm not sure that the actual label creator is using the > > different units... that's fun... > > User selected units are converted to postscript points before rendering. > Postscript points are the common denominator. Are you certain? I tried changing a label by 1cm but it looks like it only changed by 1pt. I haven't had time to look into this yet, unfortunately :/. (In reply to David Cook from comment #6) > (In reply to Chris Nighswonger from comment #3) > > (In reply to David Cook from comment #2) > > > Of course... I'm not sure that the actual label creator is using the > > > different units... that's fun... > > > > User selected units are converted to postscript points before rendering. > > Postscript points are the common denominator. > > Are you certain? I tried changing a label by 1cm but it looks like it only > changed by 1pt. > > I haven't had time to look into this yet, unfortunately :/. Point conversions are done here: http://tinyurl.com/o99ve52 This bug is addressing the fact that labels do not save the user's preferred UOM, which explains the phenomena you are describing. The real fix is for the labels code to be refactored to save templates as xml as patroncard code does. That was my long-term intention when I wrote the patroncard feature. Of course, even the best of intentions never materialize at times. :-P Created attachment 40168 [details] [review] Bug 14366 - Units doesn't get saved usefully for patroncards This patch causes the "Units" to be saved and displayed correctly for the "Edit layout" screen in Patroncards. _TEST PLAN_ Before applying: 0) Create a new layout 1) Edit the layout, change the units, and click Save 2) Edit the layout again, and notice the units are still "PostScript Points" Apply the patch: 3) Edit the layout again, change the units, and click Save 4) Edit the layout again, note that the units have changed to your selection 5) Rejoice Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Patch pushed to master. Thanks David! Pushed to 3.20.x will be in 3.20.2 Pushed to 3.16.x, will be in 3.16.13 |