Bug 22537 - Don't show Suspend all holds button when holds can no longer be susppended in OPAC
Summary: Don't show Suspend all holds button when holds can no longer be susppended in...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-19 13:58 UTC by Marjorie Barry-Vila
Modified: 2019-05-08 13:57 UTC (History)
4 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:
19.05.00


Attachments
suspend_hold (138.16 KB, image/png)
2019-03-19 13:58 UTC, Marjorie Barry-Vila
Details
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended. (6.58 KB, patch)
2019-03-19 14:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended. (6.64 KB, patch)
2019-03-19 15:27 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended. (5.45 KB, patch)
2019-04-26 14:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended. (5.51 KB, patch)
2019-04-27 14:38 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 Marjorie Barry-Vila 2019-03-19 13:58:53 UTC
Created attachment 86742 [details]
suspend_hold

Hi,

I understand that a hold can not be suspended when it is awaiting for pickup.

This is why the Suspend column is empty in the opac user's account.

However, "Suspend all holds" button still appears and causes misunderstanding. Nothing happens when you click on the button but the user thinks that his hold has been suspended.

See image attached.

Regards,
Marjorie
Comment 1 Owen Leonard 2019-03-19 14:50:43 UTC Comment hidden (obsolete)
Comment 2 sandboxes@biblibre.com 2019-03-19 15:27:11 UTC
Patch tested with a sandbox, by Marjorie <marjorie.barry-vila@collecto.ca>
Comment 3 sandboxes@biblibre.com 2019-03-19 15:27:35 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2019-03-31 17:17:04 UTC
Patch does no longer apply cleanly, can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended.
Using index info to reconstruct a base tree...
M	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
Comment 5 Owen Leonard 2019-04-26 14:05:25 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2019-04-27 14:34:14 UTC
Hi Owen, this works great. Can we have a similar fix for the staff side?
Comment 7 Katrin Fischer 2019-04-27 14:36:56 UTC
I've filed bug 22793 for staff.
Comment 8 Katrin Fischer 2019-04-27 14:38:03 UTC
Created attachment 88985 [details] [review]
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended.

This patch adds to the user summary page in the OPAC a check for waiting
or in-transit holds. If all holds are waiting or in transit the "Suspend
all" controls will be hidden.

This patch also adds a missing $KohaDates filter to the "suspended
until" date.

To test, apply the patch and log in to the OPAC as a patron with holds.
Test these conditions:

 - All holds are waiting and/or in transit
   - The "Suspend holds" controls at the bottom of the page should not
     appear.
 - Some holds are waiting and/or in transit
   - The "Suspend holds" controls should appear.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Nick Clemens 2019-04-29 16:20:52 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2019-05-08 13:57:35 UTC
Minor bug which would be challenging to backport. This won't make it into 18.11.x series.