[Bug 8034] New: Enable server print queue selection
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Priority: P5 - low Change sponsored?: --- Bug ID: 8034 CC: gmcharlt@gmail.com Assignee: kyle.m.hall@gmail.com Summary: Enable server print queue selection Severity: enhancement Classification: Unclassified OS: All Reporter: srdjan@catalyst.net.nz Hardware: All Status: NEW Version: unspecified Component: Circulation Product: Koha Re-enable server print queue selection that was disabled due to being disfunctional. Work to be done: * Add system preference UsePrintQueues. Print queue selection will be enabled only if UsePrintQueues is true. * Place admin/printers.pl link on the admin page. Should be visible UsePrintQueues dependent. * Add branches.default_printqueue that will be used if not set in session * Uncomment printer selection in "Set Library". Feature will be visible UsePrintQueues dependent. A follow-up bug will be created for printing using the selection. How to test: * Check that UsePrintQueues syspref is available * When UsePrintQueues is "No", check: - "Printers" link on the "Admin" page is not present - "Set Library" does not have printer selection - branch maintenance does not have default printer queue selection * When UsePrintQueues is "Yes", check: - "Printers" link on the "Admin" page is present - follow the link and add some printer queues - branch maintenance does have default printer queue selection - "Set Library" does have printer selection; select one - selected printer sticks for the session * -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|kyle.m.hall@gmail.com |srdjan@catalyst.net.nz --- Comment #1 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 9386 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9386&action=edit patch Please disrefard default_printqueue field, there is already branchprinter. This patch doesn't do anything really useful yet, it just restores printer setup/selection. Can I please have it signed off/pushed so I can continue with the printing bit. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |8038 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #2 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- The printer selection box still comes up, even when UsePrintQueues is set to "Don't use." Other than that, the patch seems to work fine. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9386|0 |1 is obsolete| | --- Comment #3 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 9546 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9546&action=edit patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9546|0 |1 is obsolete| | --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 9787 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9787&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Created C4::Koha::GetPrinterDetails($printqueue) * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- QA comments: * I don't understand the need/use of + my $userenv_branch = $userenv ? $userenv->{"branch"} : undef; why don't you use $userenv->{"branch"} ? * the sub + =head2 get_user_printer must not be in C4/Auth.pm, but in C4/Print.pm (not a perfect option) or in Koha:: namespace (in the hackfest currently running, I've proposed a time to discuss of naming convention/organisation for Koha:: namespace) * same comment for sub GetPrinterDetails {, should not be in C4/Koha.pm Other than this, the code looks OK (haven't tested it yet) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #6 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- (In reply to comment #5)
QA comments:
* I don't understand the need/use of + my $userenv_branch = $userenv ? $userenv->{"branch"} : undef; why don't you use $userenv->{"branch"} ?
I was not sure that $userenv is guaranteed to be there.
* the sub + =head2 get_user_printer must not be in C4/Auth.pm, but in C4/Print.pm (not a perfect option)
/() should not be in C4/Print.pm, because Print.pm is doing printing, not printer queue selection. get_user_printer() is a matter of session, that's why I placed it there (same as library selection).
or in Koha:: namespace (in the hackfest currently running, I've proposed a time to discuss of naming convention/organisation for Koha:: namespace) * same comment for sub GetPrinterDetails {, should not be in C4/Koha.pm
Other than this, the code looks OK (haven't tested it yet)
I can move GetPrinter* functions to C4/Print.pm. I'd probably prefer to have C4/Printer.pm, but C4/Print.pm would do. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #6)
(In reply to comment #5)
QA comments:
* I don't understand the need/use of + my $userenv_branch = $userenv ? $userenv->{"branch"} : undef; why don't you use $userenv->{"branch"} ?
I was not sure that $userenv is guaranteed to be there. as it's related to staff interface, you must have a $userenv available, otherwise there's a problem somewhere, and it must be fixed where it is.
* the sub + =head2 get_user_printer must not be in C4/Auth.pm, but in C4/Print.pm (not a perfect option)
/() should not be in C4/Print.pm, because Print.pm is doing printing, not printer queue selection. get_user_printer() is a matter of session, that's why I placed it there (same as library selection). OK, got it.
or in Koha:: namespace (in the hackfest currently running, I've proposed a time to discuss of naming convention/organisation for Koha:: namespace) * same comment for sub GetPrinterDetails {, should not be in C4/Koha.pm
Other than this, the code looks OK (haven't tested it yet)
I can move GetPrinter* functions to C4/Print.pm. I'd probably prefer to have C4/Printer.pm, but C4/Print.pm would do. mmm... I hesitate... I think I agree with you and the best would be to have a C4/Printer.pm.
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9787|0 |1 is obsolete| | --- Comment #8 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 10762 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10762&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10762|0 |1 is obsolete| | --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 11557 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11557&action=edit Bug 8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA Comments: It sounds good to me. But the test you added (t/db_dependent/lib/KohaTest/Printer.pm) does not passed the perl -wc : Invalid CODE attribute: Test( 1 ) at t/db_dependent/lib/KohaTest/Printer.pm line 24 BEGIN failed--compilation aborted at t/db_dependent/lib/KohaTest/Printer.pm line 24. Are these tests still used ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11557|0 |1 is obsolete| | --- Comment #11 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 11995 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11995&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #12 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Patch did not apply, so I rebased. I think I fixed that test. If not, please let me know. Actually, I'm ashamed to admit it, but I don't know how to run those tests. I tried it but getting too many errors that I don't know what to do with. I created that particular test file because I moved two functions from C4::Koha to C4::Printer. I wasn't worried about those test because they do not represent a huge value - just check ic certain subs are present, and UI would have failed anyway. Can you please shed some light on how to run those tests. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #12)
Can you please shed some light on how to run those tests.
Hum... no :) I don't know either ! It seems these tests are not still used currently. from irc : Joubu: Does someone know if unit tests in t/db_dependent/lib/KohaTest are still used ? rangi: no they aren't rangi: but if they could be made to work again, they would be rangi: you can never have too many tests Some feedback about your patch: 1/ The syspref UsePrintQueues already exists and the updatedatabase will raise an error. I think the insert is useless. 2/ A link is missing in the left menu in the administration module (under Additional parameters) 3/ The edit action does not work (in my logs: use of uninitialized value $data[0] in concatenation (.) or string at /home/koha/C4/Printer.pm line 95) 4/ It would be possible to remote one click. Indeed after adding a printer we have to click on a useless 'ok' button. Can we redirect directly on the printer list page ? 5/ When I edit a library, the printer is not selected by default 6/ In header.inc it would be better to hide the '-' caracter if there is no printer defined for the current library. 7/ It would be great to automatically select (on the fly) the printer attached to the library we select (on the selectbranchprinter page) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #14 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- (In reply to comment #13)
1/ The syspref UsePrintQueues already exists and the updatedatabase will raise an error. I think the insert is useless.
I could not see that. Can you please point me to the place where that was introduced earlier.
2/ A link is missing in the left menu in the administration module (under Additional parameters)
I'm not sure what you mean by that. There's "Network Printers" link in "Additional parameters"
3/ The edit action does not work (in my logs: use of uninitialized value $data[0] in concatenation (.) or string at /home/koha/C4/Printer.pm line 95)
That is just a warning. I can get rid of it if you wish. Edit worked nicely for me. What exactly happened?
4/ It would be possible to remote one click. Indeed after adding a printer we have to click on a useless 'ok' button. Can we redirect directly on the printer list page ?
Sounds reasonable. Will do.
5/ When I edit a library, the printer is not selected by default
I think it was a design decision, and makes sense. There could be a library without a printer. And even if there's a printer, I think it is better to have it blank initially rather than default to the first one. But if community has a different opinion, I can change that.
6/ In header.inc it would be better to hide the '-' caracter if there is no printer defined for the current library.
Will do.
7/ It would be great to automatically select (on the fly) the printer attached to the library we select (on the selectbranchprinter page)
Makes sense, will do that one too. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #14)
I could not see that. Can you please point me to the place where that was introduced earlier.
Last time I tested I had the syspref in my database, but now I don't find any occurrence on master. So maybe I already tested this patch :)
I'm not sure what you mean by that. There's "Network Printers" link in "Additional parameters"
In admin module (eg. admin/printers.pl) on the left-side.
That is just a warning. I can get rid of it if you wish. Edit worked nicely for me. What exactly happened?
Just a warning but see C4/Printer l.95: $sth->execute("$data[0]%"); It could caused a problem if it is uninitialized :) To reproduce: - click on the "new printer" button - fill with: "foo name", "foo queue", "foo type" - submit, ok - edit and change "foo queue" with "bar queue" In fact, the issue only exists if I change the queue value.
I think it was a design decision, and makes sense. There could be a library without a printer. And even if there's a printer, I think it is better to have it blank initially rather than default to the first one. But if community has a different opinion, I can change that.
Ok but if an user edit a library to change anything else, he erases the previous choice. Maybe someone else could give his/her opinion on this?
Sounds reasonable. Will do. Will do. Makes sense, will do that one too. Thanks for your work!
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11995|0 |1 is obsolete| | --- Comment #16 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 12096 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12096&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #17 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- I think I've sorted it out now. Changes are reasonably minor, so I'll leave it in Signed Off, but you can flip it to Needs Signoff if you wish. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #18 from Jonathan Druart <jonathan.druart@biblibre.com> --- Hi Srdjan, With your last patch I still can't update the queue value for an existing printer. (following my previous test plan) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #19 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Printer queue value is the primary key for the table, and cannot be updated if the printer is assigned to a branch. mysql does not support ON UPDATE CASCADE I believe. It should leave a trail in the log files. It should eirher be documented, or printers should be given synthetic ids if that is a problem. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #20 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #19)
Printer queue value is the primary key for the table, and cannot be updated if the printer is assigned to a branch. mysql does not support ON UPDATE CASCADE I believe.
It seems it does: http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html "CASCADE: Delete or update the row from the parent table, and automatically delete or update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12096|0 |1 is obsolete| | --- Comment #21 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 12157 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12157&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #22 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Ok, I stand corrected there. Queue value can be updated now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12157|0 |1 is obsolete| | --- Comment #23 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 12161 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12161&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #24 from Jonathan Druart <jonathan.druart@biblibre.com> --- I prefer someone else makes QA on this patch so I don't passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12161|0 |1 is obsolete| | --- Comment #25 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 12322 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12322&action=edit bug_5786, bug_5787, bug_5788: Holds rewrite bug_5786: moved AllowOnShelfHolds to issuingrules bug_5787: moved OPACItemHolds to issuingrules bug_5788: Added reservesmaxpickupdelay to issuingrules C4::Reserves: * Added OnShelfHoldsAllowed() to check issuingrules * Added OPACItemHoldsAllowed() to check issuingrules * IsAvailableForItemLevelRequest() changed interface, now takes $item_record,$borrower_record; calls OnShelfHoldsAllowed() opac/opac-reserve.pl and opac/opac-search.pl: * rewrote hold allowed rule to use OPACItemHoldsAllowed() * also use OnShelfHoldsAllowed() through * IsAvailableForItemLevelRequest() templates: * Removed AllowOnShelfHolds and OPACItemHolds global flags, they now only have meaning per item type Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> I have tested this patch left, right and upside down for the last several months. All tests have passed. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12161|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12322|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |rel_3_12 --- Comment #26 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Changing target version so this bug report will show up in the list of 3.12-targeted features and doesn't get lost in the shuffle during feature freeze. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 Status|Signed Off |Patch doesn't apply Patch complexity|--- |Medium patch QA Contact| |paul.poulain@biblibre.com --- Comment #27 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: * the patch does not apply anymore, there's a conflict on C4/Koha.pm. It seems to be easy to fix, but I let you do, to avoid a mistake * The DB update, you write "ALTER TABLE branches MODIFY branchprinter varchar(20) NULL, ADD FOREIGN KEY (branchprinter) REFERENCES printers (printqueue) ON UPDATE CASCADE" => why not also add ON DELETE SET NULL (on delete cascade would be a strong mistake, you don't want to delete branches just because you deleted a printer !!!) ? No other comments yet -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12161|0 |1 is obsolete| | --- Comment #28 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 13797 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13797&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13797|0 |1 is obsolete| | --- Comment #29 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 14357 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14357&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #30 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #27)
QA comment: * The DB update, you write "ALTER TABLE branches MODIFY branchprinter varchar(20) NULL, ADD FOREIGN KEY (branchprinter) REFERENCES printers (printqueue) ON UPDATE CASCADE" => why not also add ON DELETE SET NULL (on delete cascade would be a strong mistake, you don't want to delete branches just because you deleted a printer !!!) ?
This is relevant and there is no answer. Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #31 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- (In reply to comment #27)
QA comment:
* The DB update, you write "ALTER TABLE branches MODIFY branchprinter varchar(20) NULL, ADD FOREIGN KEY (branchprinter) REFERENCES printers (printqueue) ON UPDATE CASCADE" => why not also add ON DELETE SET NULL (on delete cascade would be a strong mistake, you don't want to delete branches just because you deleted a printer !!!) ?
Because we don't want to leave branches without their default printer, so only unused printers can be removed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #32 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #31)
(In reply to comment #27)
QA comment:
* The DB update, you write "ALTER TABLE branches MODIFY branchprinter varchar(20) NULL, ADD FOREIGN KEY (branchprinter) REFERENCES printers (printqueue) ON UPDATE CASCADE" => why not also add ON DELETE SET NULL (on delete cascade would be a strong mistake, you don't want to delete branches just because you deleted a printer !!!) ?
Because we don't want to leave branches without their default printer, so only unused printers can be removed.
So you must catch the error raised by mysql if a printer is deleted and some branches use it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #33 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- (In reply to comment #32)
(In reply to comment #31)
(In reply to comment #27)
QA comment:
* The DB update, you write "ALTER TABLE branches MODIFY branchprinter varchar(20) NULL, ADD FOREIGN KEY (branchprinter) REFERENCES printers (printqueue) ON UPDATE CASCADE" => why not also add ON DELETE SET NULL (on delete cascade would be a strong mistake, you don't want to delete branches just because you deleted a printer !!!) ?
Because we don't want to leave branches without their default printer, so only unused printers can be removed.
So you must catch the error raised by mysql if a printer is deleted and some branches use it.
I can do that if you insist, however current version does not do that, ie does not check anything at all. This is an improvement as is. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #34 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #33)
So you must catch the error raised by mysql if a printer is deleted and some branches use it.
I can do that if you insist, however current version does not do that, ie does not check anything at all. This is an improvement as is.
It is essential. The current version of this script is not reachable from any page. Without this catch, I get an error: DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha`.`branches`, CONSTRAINT `branches_ibfk_1` FOREIGN KEY (`branchprinter`) REFERENCES `printers` (`printqueue`) ON UPDATE CASCADE) at /home/koha/src/C4/Printer.pm line 144. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #35 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 15286 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15286&action=edit bug_8034: Disable delete printer for printers asigned to branches * C4::Printer - added branch count to printer queries * admin/printers.tt - show or not delete link -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|3.12 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |kyle.m.hall@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14357|0 |1 is obsolete| | Attachment #15286|0 |1 is obsolete| | --- Comment #36 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 17569 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17569&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * C4::Printer - added branch count to printer queries * admin/printers.tt - show or not delete link * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.saby@univ-rennes2.f | |r -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 I'm just a bot <gitbot@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |gitbot@bugs.koha-community. | |org --- Comment #37 from I'm just a bot <gitbot@bugs.koha-community.org> --- Applying: bug_8034: Restored network printer maintenance and selection Using index info to reconstruct a base tree... M C4/Auth.pm M C4/Koha.pm M admin/branches.pl M circ/circulation.pl M circ/returns.pl M installer/data/mysql/kohastructure.sql M installer/data/mysql/sysprefs.sql M installer/data/mysql/updatedatabase.pl M koha-tmpl/intranet-tmpl/prog/en/includes/header.inc M koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt M koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref M koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt M koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt A t/db_dependent/lib/KohaTest/Koha.pm Falling back to patching base and 3-way merge... CONFLICT (modify/delete): t/db_dependent/lib/KohaTest/Koha.pm deleted in HEAD and modified in bug_8034: Restored network printer maintenance and selection. Version bug_8034: Restored network printer maintenance and selection of t/db_dependent/lib/KohaTest/Koha.pm left in tree. Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/header.inc Auto-merging installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Auto-merging installer/data/mysql/kohastructure.sql Auto-merging circ/returns.pl Auto-merging circ/circulation.pl Auto-merging admin/branches.pl CONFLICT (content): Merge conflict in admin/branches.pl Auto-merging C4/Koha.pm Auto-merging C4/Auth.pm CONFLICT (content): Merge conflict in C4/Auth.pm Patch failed at 0001 bug_8034: Restored network printer maintenance and selection The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17569|0 |1 is obsolete| | --- Comment #38 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 46414 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46414&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * C4::Printer - added branch count to printer queries * admin/printers.tt - show or not delete link * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #46414|0 |1 is obsolete| | --- Comment #39 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 46415 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46415&action=edit bug_8034: Restored network printer maintenance and selection This patch is just for restoring printer maintenance and selection, not for priting itself. It is just a preparation step. * Added UsePrintQueues syspref. If set to No, no printer info will be displayed/used * Database changes: - printers table PRIMARY KEY is now printqueue. It is more natural. We should really have a synthetic id, but printqueue is good enough - branches.branchprinter is a FOREIGN KEY to printers.printqueue * Created C4::Auth::get_user_printer() function that will return appropriate printer. In order of preference: - session selected - logged in branch branchprinter * Moved printer functions to C4::Printer * C4::Printer - added branch count to printer queries * admin/printers.tt - show or not delete link * Restored printer maint/selection in admin zone UsePrintQueues permitting * Restored printer selection in circ/selectbranchprinter.pl UsePrintQueues permitting -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8352 CC| |kyle@bywatersolutions.com --- Comment #40 from Kyle M Hall <kyle@bywatersolutions.com> --- This work will certainly conflict with Bug 8352. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 --- Comment #41 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- In that case let's pick one. I have no problems with this being obsoleted in favour of 8352. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8034 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |DUPLICATE --- Comment #42 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Srdjan Jankovic from comment #41)
In that case let's pick one. I have no problems with this being obsoleted in favour of 8352.
Excellent! Thanks! *** This bug has been marked as a duplicate of bug 8352 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org