Bug 30508 - Do not display OPAC message about block from holds when OPACHoldRequests is disabled
Summary: Do not display OPAC message about block from holds when OPACHoldRequests is d...
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: rel_22_11_candidate
Depends on:
Blocks:
 
Reported: 2022-04-11 13:00 UTC by Andrew Fuerste-Henry
Modified: 2022-06-08 14:59 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled (1.83 KB, patch)
2022-04-14 12:47 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled (1.89 KB, patch)
2022-04-24 14:29 UTC, Amit Gupta
Details | Diff | Splinter Review
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled (1.89 KB, patch)
2022-04-24 17:27 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled (1.95 KB, patch)
2022-04-25 11:26 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2022-04-11 13:00:22 UTC
When a patron has charges on their account in excess of the amount set in MaxOutstanding, they see a message on their account that says "Please note: Your account has outstanding fees & charges of X.XX. Holds are blocked because your fine balance is over the limit."

If the syspref OPACHoldRequests (formerly known as RequestOnOPAC) is disabled, we should not show this alert to the patron even if they have fines over the MaxOutstanding amount.
Comment 1 Owen Leonard 2022-04-14 12:47:11 UTC
Created attachment 133308 [details] [review]
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled

This patch adds a check for the OPACHoldRequests to determine whether a
message should be shown to patrons whose account is over the
maxoutstanding limit.

To test, apply the patch and set the "maxoutstanding" system preference
to a low value. Set OPACHoldRequests to "Allow."

- Log in to the OPAC as a patron who has outstanding fines or charges
  which exceed the maxoutstanding value you set.
- You should see a message on the "Your summary" page, "Holds are
  blocked because your fine balance is over the limit."
- Set OPACHoldRequests to "Don't allow" and refresh the "Your summary"
  page in the OPAC. The message should disappear.
Comment 2 Lucas Gass 2022-04-21 21:20:25 UTC
Shouldn't we just hide the "Holds are blocked because your fine balance is over the limit" part of the message?

Seems like it would still be useful to show the "Please note: Your account has outstanding fees & charges of X.XX" part of the message, regardless of OPACHoldRequests.
Comment 3 Amit Gupta 2022-04-24 14:29:35 UTC
Created attachment 133721 [details] [review]
Bug 30508: Do not display OPAC message about block from holds  when OPACHoldRequests is disabled

To test, apply the patch and set the "maxoutstanding" system preference
to a low value. Set OPACHoldRequests to "Allow."

- Log in to the OPAC as a patron who has outstanding fines or charges
  which exceed the maxoutstanding value you set.
- You should see a message on the "Your summary" page, "Holds are
  blocked because your fine balance is over the limit."
- Set OPACHoldRequests to "Don't allow" and refresh the "Your summary"
  page in the OPAC. The message should disappear.

Works OK!
Comment 4 Victor Grousset/tuxayo 2022-04-24 17:27:46 UTC
Created attachment 133722 [details] [review]
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled

This patch adds a check for the OPACHoldRequests to determine whether a
message should be shown to patrons whose account is over the
maxoutstanding limit.

To test, apply the patch and set the "maxoutstanding" system preference
to a low value. Set OPACHoldRequests to "Allow."

- Log in to the OPAC as a patron who has outstanding fines or charges
  which exceed the maxoutstanding value you set.
- You should see a message on the "Your summary" page, "Holds are
  blocked because your fine balance is over the limit."
- Set OPACHoldRequests to "Don't allow" and refresh the "Your summary"
  page in the OPAC. The message should disappear.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Comment 5 Victor Grousset/tuxayo 2022-04-24 17:37:00 UTC
Thanks for testing Amit :) . For some reason when attaching the patch it hasn't been marked as a patch.
And don't forget to add your signoff line to the patch with:
git format-patch -s origin/master

Here has been attached a version of the patch with your signoff added (assuming you want to use the same email address as in Bugzilla)

Wait, it's not the same email address as the one I tried to attach!
So there has been something else weird with the patch attachment. Comment 3 doesn't show the signoff line but it was there and resurfaced when I attached the patch.
(Also for some reason, my attempt to add a SO line with a custom name and email didn't work)

Anyway, what is your procedure to attach a patch here?
Comment 6 Katrin Fischer 2022-04-25 11:22:07 UTC
Hi Victor, not sure about the confusion here, but Amit's sign-off line seems ok to me in his attached patch:

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Maybe it was uploaded manually, that could explain the missing 'patch' flag.
Comment 7 Katrin Fischer 2022-04-25 11:26:37 UTC
Created attachment 133740 [details] [review]
Bug 30508: Do not display OPAC message about block from holds when OPACHoldRequests is disabled

This patch adds a check for the OPACHoldRequests to determine whether a
message should be shown to patrons whose account is over the
maxoutstanding limit.

To test, apply the patch and set the "maxoutstanding" system preference
to a low value. Set OPACHoldRequests to "Allow."

- Log in to the OPAC as a patron who has outstanding fines or charges
  which exceed the maxoutstanding value you set.
- You should see a message on the "Your summary" page, "Holds are
  blocked because your fine balance is over the limit."
- Set OPACHoldRequests to "Don't allow" and refresh the "Your summary"
  page in the OPAC. The message should disappear.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Fridolin Somers 2022-05-04 21:13:13 UTC
(In reply to Lucas Gass from comment #2)
> Shouldn't we just hide the "Holds are blocked because your fine balance is
> over the limit" part of the message?
> 
> Seems like it would still be useful to show the "Please note: Your account
> has outstanding fees & charges of X.XX" part of the message, regardless of
> OPACHoldRequests.

Good point
Comment 9 Fridolin Somers 2022-05-11 08:59:38 UTC
I prefer to leave it to next cycle
Comment 10 Tomás Cohen Arazi 2022-06-08 14:59:50 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!