Bug 16463 - OPAC discharge page should warn the user about checkouts before they request
Summary: OPAC discharge page should warn the user about checkouts before they request
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Aleisha Amohia
QA Contact: Kyle M Hall
URL: /cgi-bin/koha/opac-discharge.pl
Whiteboard:
Keywords:
Depends on: 8007
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-06 14:50 UTC by Owen Leonard
Modified: 2017-11-23 23:22 UTC (History)
8 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 16463: Replace discharge link with error message if user has checked out items (3.10 KB, patch)
2017-08-30 23:30 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 16463: Replace discharge link with error message if user has checked out items (3.17 KB, patch)
2017-09-09 07:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16463: Replace discharge link with error message if user has checked out items (3.22 KB, patch)
2017-09-29 12:30 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-05-06 14:50:32 UTC
If you have checkouts you cannot request a discharge. The "ask for a discharge" page on the OPAC should warn the user about their checkouts instead of waiting to do so until after they have clicked on the "ask for a discharge" link.
Comment 1 Aleisha Amohia 2017-08-30 23:30:18 UTC Comment hidden (obsolete)
Comment 2 Caroline Cyr La Rose 2017-09-08 19:15:34 UTC
Worked.
Comment 3 Katrin Fischer 2017-09-09 07:10:28 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2017-09-09 07:11:39 UTC
Hi Caroline,
please don't forget to add your sign-off line to the bug. You can find instructions on the wiki: https://wiki.koha-community.org/wiki/Git_bz_configuration#Signing_off
I've added it to this bug for you.
Comment 5 Katrin Fischer 2017-09-09 07:15:11 UTC
And thx for testing!
Comment 6 Kyle M Hall 2017-09-29 12:30:16 UTC
Created attachment 67446 [details] [review]
Bug 16463: Replace discharge link with error message if user has checked out items

To test:
1) Ensure the useDischarge syspref is enabled
2) Check out an item to a borrower
3) Log in to the OPAC as this borrower
4) Click the 'ask for a discharge' link in the nav
5) Click the 'Ask for a discharge' link
6) Notice you cannot be discharged because you have checkouts
7) Apply the patch, click the 'ask for a discharge' link in the nav
8) Notice the link has been replaced with an appropriate error message
9) Attempt to force the discharge URL:
/cgi-bin/koha/opac-discharge?op=request
10) Notice the message and you cannot be discharged.
11) Confirm that when you check in your item, the discharge link shows
again and works as expected.

Sponsored-by: Catalyst IT
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Jonathan Druart 2017-09-29 15:45:37 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin SOMERS 2017-10-27 10:13:31 UTC
Pushed to 17.05.x, will be in 17.05.06.
Comment 9 Katrin Fischer 2017-10-29 18:19:26 UTC
This patch has been pushed to 16.11.x and will be in 16.11.14.
Comment 10 Mason James 2017-11-23 23:22:18 UTC
Pushed to 16.05.x, for 16.05.19 release