[Bug 35714] New: Clicking Print slips when no letter template selected causes error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Bug ID: 35714 Summary: Clicking Print slips when no letter template selected causes error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Preservation Assignee: koha-bugs@lists.koha-community.org Reporter: aude.charillon@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart+koha@gmail.com In the preservation module, a "Letter template for printing slip" can be selected when creating a processing. This is not a required field; the field is blank by default. When viewing a train that uses a processing where no letter template have been specified, I still see the Print slips button in the Items table actions. When I select items, the button becomes clickable. When I click on it, I get an error page (probably because there is no specified notice for Koha to use!) On master, the error page starts with the lines: Error trace No letter_code at /kohadevbox/koha/preservation/print_slip.pl line 45. at /usr/lib/aarch64-linux-gnu/perl-base/Carp.pm line 289 On a system recently upgraded to 23.11, I am getting a 500 error at /cgi-bin/koha/preservation/print_slip.pl?train_item_id=1&train_item_id=2_blank It would be better if either: - the "Letter template for printing slip" field had the Train item slip selected by default; - or, the Print slip button didn't appear at all when no letter templates are selected in the processing settings. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 160707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160707&action=edit Bug 35714: Prevent items not linked with processing with a letter code a to be printed Items linked with a processing which does not have a letter code are not supposed to be printed. Currently the code is allowing to "print slip" for items when using the link on top of the table. It results in an error "No letter_code at /kohadevbox/koha/preservation/print_slip.pl line 45." Test plan: Create a processing without a letter code Add 2 items to the waiting list then add them to a train Go to the "show train" view => notice that you cannot print slip for those items Create another processing with a letter code Edit one of the item and set it the new processing => A slip for this item can be printed Edit the other item and the train to make them use the new processing => A slip for those items can be printed -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #2 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Hi! Thank you for working on a patch. I've run into a few things when testing it out. 1. I set up test process 1 that does not include a letter template. After applying the patch I am still seeing the option to "Print slip" at the top of the table. When I click on that option I still see the "Error trace No letter_code at /kohadevbox/koha/preservation/print_slip.pl line 45. at /usr/lib/aarch64-linux-gnu/perl-base/Carp.pm line 289" error. 2. Next I created a process with a letter code. I changed my item's process to the new one (test process 2). When I submit my change it breaks the item_list table. Essentially it removes the columns and rows and only shows a number, the pencil for editing, the trash can for deleting and the printer symbol for printing the slips. All symbols work and I can print the slip -- but the table needs to be adjusted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Laura Escamilla from comment #2)
Hi!
Thank you for working on a patch. I've run into a few things when testing it out.
1. I set up test process 1 that does not include a letter template. After applying the patch I am still seeing the option to "Print slip" at the top of the table. When I click on that option I still see the "Error trace No letter_code at /kohadevbox/koha/preservation/print_slip.pl line 45. at /usr/lib/aarch64-linux-gnu/perl-base/Carp.pm line 289" error.
Can you confirm that you have run `yarn js:build` after you applied the patch?
2. Next I created a process with a letter code. I changed my item's process to the new one (test process 2). When I submit my change it breaks the item_list table. Essentially it removes the columns and rows and only shows a number, the pencil for editing, the trash can for deleting and the printer symbol for printing the slips. All symbols work and I can print the slip -- but the table needs to be adjusted.
Yes, if at least one item has a process different that the default (the one defined at the train level), then the items are not displayed in a table. This is because we cannot display several items from different process (and so different attributes/columns) in the same table. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 --- Comment #4 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- So therefore we would have to create a new train in order to change the item to a new process? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 --- Comment #5 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- 1. Can you confirm that you have run `yarn js:build` after you applied the patch? --Yes I ran the yarn build and I am still seeing errors when trying to print slips with processes that do not have a letter code. 2. Yes, if at least one item has a process different that the default (the one defined at the train level), then the items are not displayed in a table. This is because we cannot display several items from different process (and so different attributes/columns) in the same table. --That makes sense! I missed the step of changing my default process on the train when I changed it for the item. Maybe we could add a warning for libraries that says something along the lines of "New item process does not match Train xx's process."? I can see how some staff members might miss this step. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Laura Escamilla from comment #5)
1. Can you confirm that you have run `yarn js:build` after you applied the patch? --Yes I ran the yarn build and I am still seeing errors when trying to print slips with processes that do not have a letter code.
Please make sure your browser's cache is correctly flushed. You are not supposed to be able to print slip an item if it has a process without a letter template. If you still recreate can you screenshot and share it please?
2. Yes, if at least one item has a process different that the default (the one defined at the train level), then the items are not displayed in a table. This is because we cannot display several items from different process (and so different attributes/columns) in the same table.
--That makes sense! I missed the step of changing my default process on the train when I changed it for the item. Maybe we could add a warning for libraries that says something along the lines of "New item process does not match Train xx's process."? I can see how some staff members might miss this step.
I will be happy to implement your suggestion if you open a new bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #6)
Please make sure your browser's cache is correctly flushed. You are not supposed to be able to print slip an item if it has a process without a letter template.
ie. checkboxes should be disabled. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160707|0 |1 is obsolete| | --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 162350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162350&action=edit Bug 35714: Prevent items not linked with processing with a letter code a to be printed Items linked with a processing which does not have a letter code are not supposed to be printed. Currently the code is allowing to "print slip" for items when using the link on top of the table. It results in an error "No letter_code at /kohadevbox/koha/preservation/print_slip.pl line 45." Test plan: Create a processing without a letter code Add 2 items to the waiting list then add them to a train Go to the "show train" view => notice that you cannot print slip for those items Create another processing with a letter code Edit one of the item and set it the new processing => A slip for this item can be printed Edit the other item and the train to make them use the new processing => A slip for those items can be printed Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Needs Signoff |Signed Off --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works :) ---- (hmm, when going back to waiting list to make the 2nd processing, I got "you need to configure this module first" I refreshed and it went again, weird, not related to this ticket but leaving that in case that happens to someone else and we can identify the issue) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162350|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 164292 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164292&action=edit Bug 35714: Prevent items not linked with processing with a letter code a to be printed Items linked with a processing which does not have a letter code are not supposed to be printed. Currently the code is allowing to "print slip" for items when using the link on top of the table. It results in an error "No letter_code at /kohadevbox/koha/preservation/print_slip.pl line 45." Test plan: Create a processing without a letter code Add 2 items to the waiting list then add them to a train Go to the "show train" view => notice that you cannot print slip for those items Create another processing with a letter code Edit one of the item and set it the new processing => A slip for this item can be printed Edit the other item and the train to make them use the new processing => A slip for those items can be printed Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Pushed to stable --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35714 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED CC| |lucas@bywatersolutions.com --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- Not needed in 23.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org