Bug 24776 - Remove useless Borrowers Template Toolkit plugin
Summary: Remove useless Borrowers Template Toolkit plugin
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-02 14:16 UTC by Fridolin SOMERS
Modified: 2020-05-20 10:00 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24776: Remove Borrowers.HasOverdues call (1.62 KB, patch)
2020-03-02 14:39 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 24776: Remove Borrowers.IsDebarred call (2.55 KB, patch)
2020-03-02 14:39 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm (2.34 KB, patch)
2020-03-02 14:43 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 24776: Remove Borrowers.HasOverdues call (1.67 KB, patch)
2020-03-09 18:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24776: Remove Borrowers.IsDebarred call (2.60 KB, patch)
2020-03-09 18:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm (2.40 KB, patch)
2020-03-09 18:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24776: Remove Borrowers.HasOverdues call (1.74 KB, patch)
2020-03-11 15:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24776: Remove Borrowers.IsDebarred call (2.67 KB, patch)
2020-03-11 15:27 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm (2.46 KB, patch)
2020-03-11 15:27 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin SOMERS 2020-03-02 14:16:55 UTC
Borrowers Template Toolkit plugin contains methods IsDebarred and HasOverdues that can be directly called from Koha::Patron object.
Also in template circ/returns.tt, when patron is restricted and checkin was backdated, var "patron" is undefined, should be "issue.patron".
Comment 1 Fridolin SOMERS 2020-03-02 14:39:04 UTC Comment hidden (obsolete)
Comment 2 Fridolin SOMERS 2020-03-02 14:39:22 UTC Comment hidden (obsolete)
Comment 3 Fridolin SOMERS 2020-03-02 14:43:12 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2020-03-09 18:04:33 UTC
Created attachment 100411 [details] [review]
Bug 24776: Remove Borrowers.HasOverdues call

Borrowers Template Toolkit plugin contains method HasOverdues that can be directly called from Koha::Patron object.

Test plan :
1) Go to circulation page of a patron with overdues
2) Click on print button
3) You see "Print overdues"
4) Go to circulation page of a patron without overdues
5) Click on print button
6) You don't see "Print overdues"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Owen Leonard 2020-03-09 18:04:36 UTC
Created attachment 100412 [details] [review]
Bug 24776: Remove Borrowers.IsDebarred call

Borrowers Template Toolkit plugin contains method IsDebarred that can be directly called from Koha::Patron object.

Also in template circ/returns.tt, when patron is restricted and checkin was backdated, var "patron" is undefined, should be "issue.patron".

Test plan :
1) Enable system preference SpecifyReturnDate
2) For a patron without restriction create a checkout
3) Create a manual restriction to debarre patron
4) Go to return page and click on "Checkin settings"
5) Specify a date in the past, barcode and click "Check in"
6) You see message "Jon Doe is restricted. Please verify this patron should still be restricted."

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2020-03-09 18:04:38 UTC
Created attachment 100413 [details] [review]
Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Jonathan Druart 2020-03-11 15:27:39 UTC
Created attachment 100580 [details] [review]
Bug 24776: Remove Borrowers.HasOverdues call

Borrowers Template Toolkit plugin contains method HasOverdues that can be directly called from Koha::Patron object.

Test plan :
1) Go to circulation page of a patron with overdues
2) Click on print button
3) You see "Print overdues"
4) Go to circulation page of a patron without overdues
5) Click on print button
6) You don't see "Print overdues"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2020-03-11 15:27:42 UTC
Created attachment 100581 [details] [review]
Bug 24776: Remove Borrowers.IsDebarred call

Borrowers Template Toolkit plugin contains method IsDebarred that can be directly called from Koha::Patron object.

Also in template circ/returns.tt, when patron is restricted and checkin was backdated, var "patron" is undefined, should be "issue.patron".

Test plan :
1) Enable system preference SpecifyReturnDate
2) For a patron without restriction create a checkout
3) Create a manual restriction to debarre patron
4) Go to return page and click on "Checkin settings"
5) Specify a date in the past, barcode and click "Check in"
6) You see message "Jon Doe is restricted. Please verify this patron should still be restricted."

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2020-03-11 15:27:46 UTC
Created attachment 100582 [details] [review]
Bug 24776: Remove file Koha/Template/Plugin/Borrowers.pm

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Martin Renvoize 2020-03-16 14:55:59 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Joy Nelson 2020-04-03 18:16:19 UTC
enhancement not backported to 19.11.x branch