[Bug 18613] New: Deleting a Letter from a library as superlibrarian deletes the " All libraries" rule
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Bug ID: 18613 Summary: Deleting a Letter from a library as superlibrarian deletes the "All libraries" rule Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: baptiste.wojtkowski@biblibre.com QA Contact: testopia@bugs.koha-community.org To reproduce: 1- Connect as superlibrarian. 2- Create a rule for all libraries in tools/letter.pl 3- Copy this letter on a precise library, different from the one you are registred on 4- Try to delete the letter => it wants to delete the one from all libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 --- Comment #1 from Baptiste <baptiste.wojtkowski@biblibre.com> --- Created attachment 63484 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63484&action=edit Bug 18613: Correct behaviour Remove a part of the code which automatically redirects on the library of logged-in user ( not ergonomic behaviour ). TEST PLAN: 1- Connect as superlibrarian. 2- Create a rule for all libraries in tools/letter.pl 3- Copy this letter on a precise library, different from the one you are registred on 4- Try to delete the letter => it wants to delete the one from all libraries 5- Apply Patch 6- Try again to delete the letter => it proposes you the good letter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63484|0 |1 is obsolete| | --- Comment #2 from Baptiste <baptiste.wojtkowski@biblibre.com> --- Created attachment 63485 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63485&action=edit Bug 18613: Correct behaviour Remove a part of the code which automatically redirects on the library of logged-in user ( not ergonomic behaviour ). TEST PLAN: 1- Connect as superlibrarian. 2- Create a rule for all libraries in tools/letter.pl 3- Copy this letter on a precise library, different from the one you are registred on 4- Try to delete the letter => it wants to delete the one from all libraries 5- Apply Patch 6- Try again to delete the letter => it proposes you the good letter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63485|0 |1 is obsolete| | --- Comment #3 from Baptiste <baptiste.wojtkowski@biblibre.com> --- Created attachment 63486 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63486&action=edit Bug 18613: Correct behaviour Remove a part of the code which automatically redirects on the library of logged-in user ( not ergonomic behaviour ). TEST PLAN: 1- Connect as superlibrarian. 2- Create a rule for all libraries in tools/letter.pl 3- Copy this letter on a precise library, different from the one you are registred on 4- Try to delete the letter => it wants to delete the one from all libraries 5- Apply Patch 6- Try again to delete the letter => it proposes you the good letter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |baptiste.wojtkowski@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 --- Comment #4 from Baptiste <baptiste.wojtkowski@biblibre.com> --- Created attachment 63578 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63578&action=edit Bug 18613: Correct the behaviour TEST PLAN (reproducing bug) 1 - Set 'IndependantBranches' to enable 2 - Log in as Superlibrarian. 3 - Create 3 rules - 1 for all librairies (1) - 1 for the library of the superlibrarian (2) - 1 for another library (3) 4 - Try to delete them and see them and see that (3) isn't the good one (checking patch) 5 - Apply patch 6 - Try again 3- 7 - Connect as not superlibrarian 8 - Try again 3- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63486|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal CC| |fridolin.somers@biblibre.co | |m Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy CC| |paul.poulain@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63578|0 |1 is obsolete| | --- Comment #5 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 64616 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64616&action=edit Bug 18613: Correct the behaviour TEST PLAN (reproducing bug) 1 - Set 'IndependantBranches' to enable 2 - Log in as Superlibrarian. 3 - Create 3 rules - 1 for all librairies (1) - 1 for the library of the superlibrarian (2) - 1 for another library (3) 4 - Try to delete them and see them and see that (3) isn't the good one (checking patch) 5 - Apply patch 6 - Try again 3- 7 - Connect as not superlibrarian 8 - Try again 3- Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Comment on attachment 64616 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64616 Bug 18613: Correct the behaviour Review of attachment 64616: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18613&attachment=64616) ----------------------------------------------------------------- ::: C4/Letters.pm @@ +204,5 @@
+ my $only_my_library = C4::Context->only_my_library; + if ( $only_my_library and $branchcode ) { + $branchcode = $only_my_library;
C4::Context->only_my_library is supposed to return a boolean value. You should use C4::Context::mybranch() here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |julian.maurice@biblibre.com --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Also, if you could change the patch subject to a more meaningful one, that would be great! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 --- Comment #8 from Baptiste <baptiste.wojtkowski@biblibre.com> --- Created attachment 64912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64912&action=edit Bug 18613: Remove letter rule correctly as superlibrarian TEST PLAN (reproducing bug) 1 - Set 'IndependantBranches' to enable 2 - Log in as Superlibrarian. 3 - Create 3 rules - 1 for all librairies (1) - 1 for the library of the superlibrarian (2) - 1 for another library (3) 4 - Try to delete them and see them and see that (3) isn't the good one (checking patch) 5 - Apply patch 6 - Try again 3- 7 - Connect as not superlibrarian 8 - Try again 3- Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64616|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64912|0 |1 is obsolete| | --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 64914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64914&action=edit Bug 18613: Remove letter rule correctly as superlibrarian TEST PLAN (reproducing bug) 1 - Set 'IndependantBranches' to enable 2 - Log in as Superlibrarian. 3 - Create 3 rules - 1 for all librairies (1) - 1 for the library of the superlibrarian (2) - 1 for another library (3) 4 - Try to delete them and see them and see that (3) isn't the good one (checking patch) 5 - Apply patch 6 - Try again 3- 7 - Connect as not superlibrarian 8 - Try again 3- Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Passed QA |Failed QA --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Please provide tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 --- Comment #11 from Baptiste <baptiste.wojtkowski@biblibre.com> --- Created attachment 64987 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64987&action=edit Bug 18613: Add unit tests for getletter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18613 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x and will be in 16.11.10. Tests pass, but there is an additional warn about userenv: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Letters.t t/db_dependent/Letters.t .. 1/74 C4::Context->userenv not defined! at /home/vagrant/kohaclone/C4/Letters.pm line 206. Fake sendmail at t/db_dependent/Letters.t line 32. t/db_dependent/Letters.t .. ok All tests successful. Files=1, Tests=74, 1 wallclock secs ( 0.02 usr 0.00 sys + 1.17 cusr 0.36 csys = 1.55 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org