Bug 37866 - Unable to resolve claim from patron details page
Summary: Unable to resolve claim from patron details page
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Emmi Takkinen
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-09 11:55 UTC by Emmi Takkinen
Modified: 2024-11-18 16:45 UTC (History)
3 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:
24.11.00
Circulation function:


Attachments
Bug 37866: Unable to resolve claim from patron details page if syspref ClaimReturnedLostValue is disabled (2.02 KB, patch)
2024-09-11 11:16 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 37866: Unable to resolve claim from patron details page if syspref ClaimReturnedLostValue is disabled (2.07 KB, patch)
2024-09-11 17:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37866: Unable to resolve claim from patron details page if syspref ClaimReturnedLostValue is disabled (2.19 KB, patch)
2024-11-12 20:47 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 37866: (QA follow-up) Fix another missed case (1.08 KB, patch)
2024-11-12 20:47 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emmi Takkinen 2024-09-09 11:55:18 UTC
If ones tries to resolve a claim from patrons detail page, "Resolve return claim" pop up isn't displayed. Page just jumps to the top of the page. However this works from the patron check out page.

To reproduce:
1. Find patron with claims (or create them).
2. Navigate to patrons detail page and from there open "Claims" tab.
3. Press "Resolve" button.
=> Pop up isn't displayed and page jumps to the top of the page. 
4. Repeat from patrons check out page.
=> Pop up is displayed.
Comment 1 Owen Leonard 2024-09-09 12:08:49 UTC
I can't reproduce this bug in main
Comment 2 Emmi Takkinen 2024-09-10 09:40:40 UTC
I was able reproduce this also in Biblibre sandbox. For some reason, even thought both patron Detail and Check out pages share the same code to create "Resolve" button and display pop up module, in Detail page clicking "Resolve" doesn't launch click function in resolve_claim_modal.js (first line).
Comment 3 Emmi Takkinen 2024-09-11 10:33:01 UTC
This happens when ClaimReturnedLostValue syspref is not enabled. In moremember.tt line 765 we only check if ClaimReturnedLostValue is enabled. In circulation.tt line 1023 we check if either ClaimReturnedLostValue _or_ BundleLostValue syspref is enabled.

Here's updated plan to reproduce this bug:
1. Disable syspref "ClaimReturnedLostValue" (set used value empty).
2. Find patron with claims (or create them).
3. Navigate to patrons detail page and from there open "Claims" tab.
4. Press "Resolve" button.
=> Pop up isn't displayed and page jumps to the top of the page. 
5. Repeat from patrons check out page.
=> Pop up is displayed.
Comment 4 Emmi Takkinen 2024-09-11 11:16:31 UTC
Created attachment 171301 [details] [review]
Bug 37866: Unable to resolve claim from patron details page if syspref ClaimReturnedLostValue is disabled

If ones tries to resolve a claim from patrons detail page
and syspref ClaimReturnedLostValue is disabled,
"Resolve return claim" pop up isn't displayed. Page just
jumps to the top of the page. However this works from the
patron check out page.

This happens because in moremember.tt line 765 we only
check if  ClaimReturnedLostValue is enabled. In
circulation.tt line 1023 we check if either
ClaimReturnedLostValue or BundleLostValue syspref is enabled.

To test:
1. Disable syspref "ClaimReturnedLostValue" (set used value empty).
2. Find patron with claims (or create them).
3. Navigate to patrons detail page and from there open "Claims" tab.
4. Press "Resolve" button.
=> Pop up isn't displayed and page jumps to the top of the page.
5. Repeat steps on patrons check out page.
=> Pop up is displayed.
6. Apply this patch.
=> Pop up should now be displayed both in patrons details and check
out pages.

Sponsored-by: Koha-Suomi Oy
Comment 5 Owen Leonard 2024-09-11 17:34:35 UTC
Created attachment 171352 [details] [review]
Bug 37866: Unable to resolve claim from patron details page if syspref ClaimReturnedLostValue is disabled

If ones tries to resolve a claim from patrons detail page
and syspref ClaimReturnedLostValue is disabled,
"Resolve return claim" pop up isn't displayed. Page just
jumps to the top of the page. However this works from the
patron check out page.

This happens because in moremember.tt line 765 we only
check if  ClaimReturnedLostValue is enabled. In
circulation.tt line 1023 we check if either
ClaimReturnedLostValue or BundleLostValue syspref is enabled.

To test:
1. Disable syspref "ClaimReturnedLostValue" (set used value empty).
2. Find patron with claims (or create them).
3. Navigate to patrons detail page and from there open "Claims" tab.
4. Press "Resolve" button.
=> Pop up isn't displayed and page jumps to the top of the page.
5. Repeat steps on patrons check out page.
=> Pop up is displayed.
6. Apply this patch.
=> Pop up should now be displayed both in patrons details and check
out pages.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Emmi Takkinen 2024-09-13 09:15:44 UTC
I was thinking about this some more, is it really wise to prevent pop up from launching if syspref is off but still display button in UI? It's kinda confusing for the user to have button there but no any kind of hint why it's not working.
Comment 7 Emily Lamancusa (emlam) 2024-11-12 20:04:15 UTC
(In reply to Emmi Takkinen from comment #6)
> I was thinking about this some more, is it really wise to prevent pop up
> from launching if syspref is off but still display button in UI? It's kinda
> confusing for the user to have button there but no any kind of hint why it's
> not working.

Looks like the bug was a missed case from 66b35f50 - Bug 28854: Enable claims return view when BundleLostValue is set. The button (actually, all return claims functionality) is hidden if both ClaimReturnedLostValue and BundleLostValue are empty. So this should be fine - the check for BundleLostValue just got missed in this spot, causing the modal to not load when it should have.
Comment 8 Emily Lamancusa (emlam) 2024-11-12 20:47:57 UTC
Created attachment 174438 [details] [review]
Bug 37866: Unable to resolve claim from patron details page if syspref ClaimReturnedLostValue is disabled

If ones tries to resolve a claim from patrons detail page
and syspref ClaimReturnedLostValue is disabled,
"Resolve return claim" pop up isn't displayed. Page just
jumps to the top of the page. However this works from the
patron check out page.

This happens because in moremember.tt line 765 we only
check if  ClaimReturnedLostValue is enabled. In
circulation.tt line 1023 we check if either
ClaimReturnedLostValue or BundleLostValue syspref is enabled.

To test:
1. Disable syspref "ClaimReturnedLostValue" (set used value empty).
2. Find patron with claims (or create them).
3. Navigate to patrons detail page and from there open "Claims" tab.
4. Press "Resolve" button.
=> Pop up isn't displayed and page jumps to the top of the page.
5. Repeat steps on patrons check out page.
=> Pop up is displayed.
6. Apply this patch.
=> Pop up should now be displayed both in patrons details and check
out pages.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 9 Emily Lamancusa (emlam) 2024-11-12 20:47:59 UTC
Created attachment 174439 [details] [review]
Bug 37866: (QA follow-up) Fix another missed case

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 10 Katrin Fischer 2024-11-18 16:45:46 UTC
Pushed for 24.11!

Well done everyone, thank you!