Bug 37866 - Unable to resolve claim from patron details page
Summary: Unable to resolve claim from patron details page
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Emmi Takkinen
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-09 11:55 UTC by Emmi Takkinen
Modified: 2024-09-13 09:15 UTC (History)
2 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:
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

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.