Description
Kyle M Hall
2012-07-03 15:08:40 UTC
Created attachment 10627 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have 'hold to pull' notices printed out automatically for librarians. These notices will be based on the data in the tmp_holdsqueue table. As each new row is added to tmp_holdsqueue, a notice for that given row is printed. The system will have the ability to define a separate printer for each branchcode, so in theory each library could receive holds to pull notices printed automatically at holding library for that item, assuming they have set up the ability to print over the LAN, WAN, or Internet. Created attachment 10766 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/kohastructure.sql CONFLICT (content): Merge conflict in installer/data/mysql/kohastructure.sql Auto-merging C4/Installer/PerlDependencies.pm CONFLICT (content): Merge conflict in C4/Installer/PerlDependencies.pm Failed to merge in the changes. Created attachment 12523 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Created attachment 13465 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Please provide a test plan. Test Plan: 1) Apply patch 2) Run updatedatabase.pl 3) Place some holds for two or more branches 4) Run misc/cronjobs/holds/print_holds_to_pull_on_demand.pl --test --printer MPL,lp,printserver,515 --printer CPL,lp2,printserver,516 Each --printer switch is the configuration for a given branch. Each branch can have a separate printer, or multiple branches can use the same printer. The switch value is the branchcode, printer name, server name and server port separated by commas. If a printer is not defined for a given branch, notices for that branch will not be printed. Created attachment 14394 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Patch does not apply on master: error: patch failed: C4/Installer/PerlDependencies.pm:633 error: C4/Installer/PerlDependencies.pm: patch does not apply error: patch failed: installer/data/mysql/en/mandatory/sample_notices.sql:10 error: installer/data/mysql/en/mandatory/sample_notices.sql: patch does not apply error: patch failed: installer/data/mysql/updatedatabase.pl:6339 error: installer/data/mysql/updatedatabase.pl: patch does not apply Created attachment 16338 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Created attachment 16543 [details] [review] [Signed off] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> I like the idea of use Net::Printer, but did you know there is already a printer queue and a script to set the printer (network one). This could be generalised to use this Check admin/printers.pl And DROP TABLE IF EXISTS `printers`; CREATE TABLE `printers` ( `printername` varchar(40) NOT NULL default '', `printqueue` varchar(20) default NULL, `printtype` varchar(20) default NULL, PRIMARY KEY (`printername`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; So i'd like to see it use this (extended if nessecary). Will put this to In discussion and will wait for an opinion from Galen, if he is happy with it as it is, I will continue with QA on it. I think I like the idea to have a separate printing queue. Here in Germany we have big libraries with closed stacks with multiple areas and printers. It looks to me like using printers this feature would be easier extendable in the future? Now that somebody has actively called my attention to this: +1 to using Net::Printer. +1 to taking advantage of the existing structure for defining print queues. Created attachment 27127 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> (In reply to Galen Charlton from comment #14) > +1 to taking advantage of the existing structure for defining print queues. I'm afraid I don't believe this to be as good an idea as it may have seemed at first. It appears that admin/printers.pl has been hidden since 2008, 8 years ago. The schema for this table would need to be completely recreated as the existing one does not fit with the data needed for Net::Printer. Even worse, the code itself is extremely broken and would have to be rewritten from scratch. So, in short, we wouldn't be taking advantage of the existing structure for defining print queues, because it would all need to be completely thrown away and totally rewritten, including the printers table itself. I'm not really seeing what the advantage would be to defining the printers from the web interface either. In fact, it seems even a bit unwanted perhaps. Printer configuration is a system administration task. I don't see a great advantage to allowing librarians to alter the printer data from a web interface. Any thoughts? I took only a quick look at the patch and I think if we go the route of adding a new column to reserves, we also need to add the column old_reserves. What happens if a print is not possible? (printer offline, no paper, etc.) is there a way to repeat the prints? Just a thought, but having the date/time of the print might be useful. Failing QA on Kyle's request, because of old_reserves - still waiting for Galen's opionion of course. (In reply to Kyle M Hall from comment #16) > (In reply to Galen Charlton from comment #14) > > +1 to taking advantage of the existing structure for defining print queues. > > I'm afraid I don't believe this to be as good an idea as it may have seemed > at first. It appears that admin/printers.pl has been hidden since 2008, 8 > years ago. The schema for this table would need to be completely recreated > as the existing one does not fit with the data needed for Net::Printer. Even > worse, the code itself is extremely broken and would have to be rewritten > from scratch. I've sent Chris a query regarding whether he's got the current print queue stuff working for any of his libraries. > So, in short, we wouldn't be taking advantage of the existing structure for > defining print queues, because it would all need to be completely thrown > away and totally rewritten, including the printers table itself. Agreed there are some changes that would be required. > I'm not really seeing what the advantage would be to defining the printers > from the web interface either. In fact, it seems even a bit unwanted > perhaps. Printer configuration is a system administration task. I don't see > a great advantage to allowing librarians to alter the printer data from a > web interface. Disagree. Particularly since Net::Printer talks to the printer directly, there isn't any server-side configuration of setting up lpr queues as seems to be required for the current printer queue approach. I've got a question unrelated to the implementation :) When an item is returned on the self check, it's not set to waiting, so it should show up on the holds to pull list. Would this also trigger a print? Some notes after talking to Kyle about this feature: - The prints will happen when the hold is places, the printer used is the pickup branch. This means, that will work for single brnach libraries, but might be a problem to multi branch libraries. Also if the item is - The printed flag being on reserves will make it a bit harder to extend this later, I think I would like a separate table with a time queued and a time printed better. We could also extend that later for other automated prints. - If the flag stays on reserves, we might want to make it a datetime instead for the time it was printed. Created attachment 28333 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 28334 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Created attachment 28335 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Test Plan addition: There are several new module dependencies for this feature: HTML::HTMLDoc: Required for both LPR and CUPS printing if printing HTML Net::Printer: Required for LPR printing Printer: Required for CUPS printing Created attachment 28651 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Created attachment 28652 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Created attachment 28653 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Created attachment 28654 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server I fixed the conflict on the first patch bug get fatal: sha1 information is lacking or useless (installer/data/mysql/updatedatabase.pl). on applying the second one. Created attachment 36833 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 36834 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Hi, on your first patch you add on kohastructure.pl `printed` tinyint(1) DEFAULT NULL, for reserves and old_reserves But on final updatedatabase.pl (needs to be on atomicupdate!), you "only" alter reserves but using a different type $dbh->do("ALTER TABLE reserves ADD printed DATETIME NULL AFTER suspend_until"); Both patches have conflicts (In reply to Bernardo Gonzalez Kriegel from comment #32) > Hi, > on your first patch you add on kohastructure.pl > `printed` tinyint(1) DEFAULT NULL, > for reserves and old_reserves > > But on final updatedatabase.pl (needs to be on atomicupdate!), you > "only" alter reserves but using a different type > > $dbh->do("ALTER TABLE reserves ADD printed DATETIME NULL AFTER > suspend_until"); > > Both patches have conflicts Good catch! Created attachment 40749 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 40750 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Created attachment 40751 [details] [review] Bug 8352 [QA Followup] - Fix column type in kohastructure.sql All patches apply, but think you need to add this line to atomicupdate file: ALTER TABLE old_reserves ADD printed DATETIME NULL AFTER suspend_until; Both tables are modified on kohastructure Is 'Signed Off' the right status? Kyle, 1/ You propose a --test option to the script, but I think the test behavior should be the default and --confirm should sent the job to the printer, don't you think? 2/ Please avoid sql queries in pl scripts. 3/ You should also address Bernardo's concern. Created attachment 41579 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 41580 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Created attachment 41581 [details] [review] Bug 8352 [QA Followup] - Fix column type in kohastructure.sql Created attachment 41582 [details] [review] Bug 8352 [QA Followup] * Add --confirm option to print_holds.pl * Modify old_reserves to match reserves Created attachment 41583 [details] [review] Bug 8352 [QA Followup] - Don't use SQL in pl files Only the first patch is signed off. svc/printer does not follow the coding guidelines. (In reply to Jonathan Druart from comment #45) > svc/printer does not follow the coding guidelines. forget that, it's done in the last patch. Created attachment 44359 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 44360 [details] [review] [SIGNED-OFF] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 44361 [details] [review] [SIGNED-OFF] Bug 8352 [QA Followup] - Fix column type in kohastructure.sql Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 44362 [details] [review] [SIGNED-OFF] Bug 8352 [QA Followup] * Add --confirm option to print_holds.pl * Modify old_reserves to match reserves Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 44363 [details] [review] [SIGNED-OFF] Bug 8352 [QA Followup] - Don't use SQL in pl files Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Please rebase - there are several conflicts. Created attachment 45275 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 45276 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 45277 [details] [review] Bug 8352 [QA Followup] - Fix column type in kohastructure.sql Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 45278 [details] [review] Bug 8352 [QA Followup] * Add --confirm option to print_holds.pl * Modify old_reserves to match reserves Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 45279 [details] [review] Bug 8352 [QA Followup] - Don't use SQL in pl files Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> (In reply to Kyle M Hall from comment #24) > Test Plan addition: > There are several new module dependencies for this feature: > HTML::HTMLDoc: Required for both LPR and CUPS printing if printing HTML > Net::Printer: Required for LPR printing > Printer: Required for CUPS printing Did you check how easy/difficult it is to package these 2 modules? They don't seem maintained anymore Printer-0.98 17 Aug 2004 HTML-HTMLDoc-0.11_01 03 Nov 2009 Is it possible both modules are not packaged for Ubuntu? I couldn't install/find either via apt-get? I think the dependency questions need to be resolved first, before we can move this further through QA! Starting with a code review anyway: 1) QA script FAIL koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/printers.tt FAIL spelling recieve ==> receive FAIL misc/cronjobs/holds/print_holds.pl FAIL pod *** ERROR: =over on line 135 without closing =back (at head1) in file misc/cronjobs/holds/print_holds.pl 2) New notice a) The insert statements are missing the message_transport_type: +INSERT INTO `letter` (`module`,`code`,`branchcode`,`name`,`is_html`,`title`,`content`) b) HOLD_PLACED_PRINT sounds like there is a connection to the existing HOLD_PLACED feature. If this is the case, should this be just the 'print' version of the HOLD_PLACED notice? And if not, should we rename to make the difference clear? c) Notice is missing from the translated web installers. 3) Templates a) Icons need to be switched to Font Awesome. For example: koha-tmpl/intranet-tmpl/prog/en/includes/printers-toolbar.inc. b) koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt changes the heading and description of one of the toolbar items back to the old one, should be: Z39.50/SRU searvers c) I think page title/breadcrumbs and the new entry on Administration should match. Personally I'd prefer the simpler 'Printers' to 'Printer editor' as it's more in line with our other pages. d) This would be nicer to translate using the newer syntax and a placeholder: else if (confirm(_("Are you sure you wish to delete printer(s) ") + idsToDelete + "?")) See: Bug 12138 - Use placeholders in translatable javascript strings 4) Terminology Holds!! :) koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/printers.tt print automatic reserve notices 5) Copyright Is the copyright correct on the new file svc/printer? +# Copyright 2014 ByWater Solutions +# Copyright 2012 Foundations Bible College Inc. (In reply to Jonathan Druart from comment #58) > (In reply to Kyle M Hall from comment #24) > > Test Plan addition: > > There are several new module dependencies for this feature: > > HTML::HTMLDoc: Required for both LPR and CUPS printing if printing HTML > > Net::Printer: Required for LPR printing > > Printer: Required for CUPS printing > > Did you check how easy/difficult it is to package these 2 modules? > > They don't seem maintained anymore > Printer-0.98 17 Aug 2004 > HTML-HTMLDoc-0.11_01 03 Nov 2009 I have no experience packaging modules nor do I see any documentation on the Koha wiki. Created attachment 45362 [details] [review] Bug 8352 [QA Followup] Created attachment 45365 [details] [review] Bug 8352 [QA Followup] - Notices for translation Kyle, can you verify that the dependencies both need packaging? Are there possible alternatives? I am marking this blocked until we know more about the added dependencies. (In reply to Kyle M Hall from comment #60) > I have no experience packaging modules nor do I see any documentation on the > Koha wiki. http://wiki.koha-community.org/wiki/Building_Debian_Dependencies/Dependency_Guidelines (In reply to Katrin Fischer from comment #64) > I am marking this blocked until we know more about the added dependencies. Based on the documentation here: http://wiki.koha-community.org/wiki/Building_Debian_Dependencies/Dependency_Guidelines I ran "dh-make-perl --pkg-perl --build --cpan The::Module" for each of the new deps and it didn't generate any errors, so I think that means building the packages shouldn't be a problem! Side note: this feature will also require the addition of the debian package htmldoc. Noting licenses of the proposed dependencies: Net::Printer - BSD; GPL- and DFSG-compatible Printer - Artistic License; not GPL-compatible, but DFSG-free. (Ancient module, though, and doesn't appear to be currently maintained). HTML::HTMLDoc - Perl license. (Also ancient, doesn't appear to be currently maintained, and has 23 open issues on CPAN). I wonder if Net::CUPS might be a better bet; it's currently packaged for Debian, but on the other hand, the Perl module doesn't appear to be maintained either. :/ Kyle, For bug 8007, I have first used HTML::HTMLDoc too, but finally changed for PDF::FromHTML. Indeed HTML::HTMLDoc is buggy, see bug 8007 comment 64. Have a loot at Koha::Borrower::Discharge::generate_as_pdf for an example on how to use it. Moving this to FQA to get feedback from Kyle about the proposed alternatives. Created attachment 45651 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 45652 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 45653 [details] [review] Bug 8352 [QA Followup] - Fix column type in kohastructure.sql Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 45654 [details] [review] Bug 8352 [QA Followup] - Don't use SQL in pl files Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 45655 [details] [review] Bug 8352 [QA Followup] Created attachment 45656 [details] [review] Bug 8352 [QA Followup] - Notices for translation Created attachment 45657 [details] [review] Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc Created attachment 45658 [details] [review] Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc Created attachment 45659 [details] [review] Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc (In reply to Katrin Fischer from comment #70) > Moving this to FQA to get feedback from Kyle about the proposed alternatives. I've switch to PDF::FromHTML due to the encoding and other issues related to HTML::HTMLDoc. I don't think there is a compelling reason to switch to Net::CUPS considering it is no more active than the currently used modules, and doesn't have very good documentation. Note, the newest followup requires the package 'ghostscript' to be installed. *** Bug 8034 has been marked as a duplicate of this bug. *** fatal: sha1 information is lacking or useless (C4/Installer/PerlDependencies.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 8352 - Add printer administration, update script to use Koha defined printers Created attachment 46878 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 46879 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 46880 [details] [review] Bug 8352 [QA Followup] - Fix column type in kohastructure.sql Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 46881 [details] [review] Bug 8352 [QA Followup] - Don't use SQL in pl files Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 46882 [details] [review] Bug 8352 [QA Followup] Created attachment 46883 [details] [review] Bug 8352 [QA Followup] - Notices for translation Created attachment 46884 [details] [review] Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc Created attachment 48127 [details] [review] Bug 8352 - Add automatic printing of 'hold to pull' notices Adds the ability to have a notice printed automatically after a hold has been placed. The system has the ability to define a separate printer for each branchcode, so each library can receive a printed notice for any holds placed, assuming they have set up the ability to print over the LAN, WAN, or Internet. Notices are printed to the pickup library. Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> bsoletes: 46882 - Bug 8352 [QA Followup] Created attachment 48128 [details] [review] Bug 8352 - Add printer administration, update script to use Koha defined printers This patch adds the ability to define printers within Koha. The printer CRUD is based on the code for the quote of the day system. This patch extends the existing ability to print via LPR to any network printer with the added ability to print to a CUPS printer configured on the Koha server. Test Plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Browse to admin/printers.pl 4) Configure a network printer via LPR ( explained in the printers help ) 5) Create a hold 6) Execute the command "misc/cronjobs/holds/print_holds.pl -v --printer $BRANCHCODE=$PRINTER_ID where branchcode is the pickup branch for the hold, and printer_id is the id number for the printer. 7) See your reserve slip is printer! Bonus points: Repeat the test plan, but for a printer you set up via CUPS on the Koha server Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 48129 [details] [review] Bug 8352 [QA Followup] - Fix column type in kohastructure.sql Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 48130 [details] [review] Bug 8352 [QA Followup] - Don't use SQL in pl files Signed-off-by: Jenice Tate <jtate@mdah.state.ms.us> Created attachment 48131 [details] [review] Bug 8352 [QA Followup] Created attachment 48132 [details] [review] Bug 8352 [QA Followup] - Notices for translation Created attachment 48133 [details] [review] Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc Patches rebased, conflicts in notices sql files fixed! QA comments: 1/ FAIL Koha/Printer.pm FAIL critic "$pdf_data" is declared but not used at line 61, column 9. Unused variables clutter code and make it harder to read. 2/ What's the status of the NET::Printer lib? It's not packaged already. Kyle, did you try to package it? Failing QA for 1. Created attachment 48134 [details] [review] Bug 8352: Fix perlcritic '$pdf_data' is declared but not used Created attachment 48135 [details] [review] Bug 8352: Fix type vs _type for bug 15446 (In reply to Jonathan Druart from comment #98) > Patches rebased, conflicts in notices sql files fixed! > > QA comments: > 1/ > FAIL Koha/Printer.pm > FAIL critic > "$pdf_data" is declared but not used at line 61, column 9. > Unused variables clutter code and make it harder to read. Ok fixed. (In reply to Jonathan Druart from comment #98) > 2/ What's the status of the NET::Printer lib? It's not packaged already. > Kyle, did you try to package it? Still waiting for an answer. (In reply to Jonathan Druart from comment #102) > (In reply to Jonathan Druart from comment #98) > > 2/ What's the status of the NET::Printer lib? It's not packaged already. > > Kyle, did you try to package it? > > Still waiting for an answer. I can tell you that dh-make-perl --pkg-perl --build --cpan Net::Printer produced a deb file with no apparent errors. However, without any good documentation on the package submission process, I really don't know where to go from there. You've read https://wiki.koha-community.org/wiki/Building_Debian_Dependencies right? (In reply to Chris Cormack from comment #104) > You've read > https://wiki.koha-community.org/wiki/Building_Debian_Dependencies right? Yep. I'm a bit lost on http://pkg-perl.alioth.debian.org/git.html . There is a bit of hand waving there, the section titled "building the package" has the most helpful guidance: Use your favourite way of building the Debian package. This documentation is simply not clear not understandable. I don't claim to be the brightest bulb there is, but I'd like to think I can follow instructions when they are presented in a reasonable way ; ) Also, when I try to confirm my account on Alioth, all I get is a "user not found" error. So I can't even push the code to Alioth. Weird, working fine for me. You've asked to be added to the group eh? http://pkg-perl.alioth.debian.org/ (Under A note on joining) All the docs are on that page. You could try asking on the #debian-perl channel listed there. They are pretty receptive to helping Or you could try to catch jajm on IRC he's usually closer to your timezone than I am. And has packaged https://tracker.debian.org/pkg/libtemplate-stash-autoescaping-perl (In reply to Chris Cormack from comment #107) > Weird, working fine for me. > > You've asked to be added to the group eh? > http://pkg-perl.alioth.debian.org/ > (Under A note on joining) > > All the docs are on that page. You could try asking on the #debian-perl > channel listed there. They are pretty receptive to helping > > Or you could try to catch jajm on IRC he's usually closer to your timezone > than I am. And has packaged > https://tracker.debian.org/pkg/libtemplate-stash-autoescaping-perl Thanks! I figured out why I couldn't confirm my account ( all new accounts end with -guest and I didn't notice that ). I've requested to be added to the pkg-perl group. I'll check out the docs. Thanks again! Are there any plans to revive/continue this? (In reply to Katrin Fischer from comment #109) > Are there any plans to revive/continue this? I'm open to continuing work on this, but I don't know when I'll be able to pick back up on it. Closing this ticket as the printers table no longer exists in master. Will revisit and reopen as a new feature. |