Bug 31137 - Error editing label template
Summary: Error editing label template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Adolfo Rodríguez Taboada
QA Contact: Nick Clemens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-12 07:17 UTC by Adolfo Rodríguez Taboada
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

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


Attachments
Fix Bug 31137 - Error editing label template (1.21 KB, patch)
2022-07-12 07:31 UTC, Adolfo Rodríguez Taboada
Details | Diff | Splinter Review
Fix - Bug 31137 - Error editing label template (1.26 KB, patch)
2022-07-15 12:11 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31137: (QA follow-up) Also fix new template page (1.16 KB, patch)
2022-07-15 12:11 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31137: Only display label printer profiles when editing labels (1.70 KB, patch)
2022-07-15 12:13 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31137: (QA follow-up) Also fix new template page (1.16 KB, patch)
2022-07-15 12:13 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Adolfo Rodríguez Taboada 2022-07-12 07:17:34 UTC
While editing a label template, you may choose a Printer Profile for Patroncards resulting in an error 500 when saving the changes.

Can't bless non-reference value at /home/adolfo/workspace/koha-master/C4/Creators/Profile.pm line 88

It's the same error described on bug 24001, but in Labels instead of Patron cards
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24001
Comment 1 Adolfo Rodríguez Taboada 2022-07-12 07:31:53 UTC
Created attachment 137607 [details] [review]
Fix Bug 31137 - Error editing label template

This patch filters the printer profiles in the label edition template so you may only choose Printer Profiles created for Labels.

To test
1 Create a new Printer Profile in Patron Cards
2 Edit a Label template, pick the Printer Profile you just created.
3 Save the Label Template. You get an error 500
4 apply patch, restart services
5 Edit a Label template and check that you can't pick the Printer Profile you created in Patron Cards
Comment 2 Nick Clemens 2022-07-15 12:11:23 UTC
Created attachment 137749 [details] [review]
Fix - Bug 31137 - Error editing label template

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 3 Nick Clemens 2022-07-15 12:11:27 UTC
Created attachment 137750 [details] [review]
Bug 31137: (QA follow-up) Also fix new template page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens 2022-07-15 12:13:20 UTC
Created attachment 137751 [details] [review]
Bug 31137: Only display label printer profiles when editing labels

This patch filters the printer profiles in the label edition template so you may only choose Printer Profiles created for Labels.

To test
1 Create a new Printer Profile in Patron Cards
2 Edit a Label template, pick the Printer Profile you just created.
3 Save the Label Template. You get an error 500
4 apply patch, restart services
5 Edit a Label template and check that you can't pick the Printer Profile you created in Patron Cards

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens 2022-07-15 12:13:23 UTC
Created attachment 137752 [details] [review]
Bug 31137: (QA follow-up) Also fix new template page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens 2022-07-15 12:13:45 UTC
Straightforward - PQA
Comment 7 Tomás Cohen Arazi 2022-07-18 13:31:49 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 8 Lucas Gass 2022-08-23 16:52:55 UTC
Backported to 22.05.x for 22.05.05
Comment 9 Arthur Suzuki 2022-08-30 09:19:59 UTC
thx pushed to 21.11.x for 21.11.12
Comment 10 Victor Grousset/tuxayo 2022-09-09 23:51:55 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.