Bug 31521 - Allow to configure behaviour when checking in a reserved item at SCO
Summary: Allow to configure behaviour when checking in a reserved item at SCO
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-05 14:14 UTC by Julian Maurice
Modified: 2024-08-21 16:48 UTC (History)
2 users (show)

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


Attachments
Bug 31521: Configure behaviour when checking in a reserved item at SCO (7.48 KB, patch)
2022-09-05 14:16 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 31521: Configure behaviour when checking in a reserved item at SCO (8.09 KB, patch)
2024-07-29 10:25 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review
Bug 31521: Configure behaviour when checking in a reserved item at SCO (8.07 KB, patch)
2024-08-21 16:48 UTC, Sam Lau
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2022-09-05 14:14:03 UTC
Some users want to display a custom message to patrons self returning items that are on hold.
Comment 1 Julian Maurice 2022-09-05 14:16:53 UTC
Created attachment 140212 [details] [review]
Bug 31521: Configure behaviour when checking in a reserved item at SCO

This patch adds a system preference (SCOCheckinIfReservedBehaviour)
which allow to control the behaviour of SCO checkin when the returned
item is reserved:
- allow checkin (current behaviour)
- allow checkin and show a message
- forbid checkin and show a message

The message is configurable is another system preference
(SCOCheckinIfReservedMessage)

Test plan:
1. Apply patch, run updatedatabase.pl and restart koha
2. Enable WebBasedSelfCheck and SCOAllowCheckin
3. (Staff) Set SCOCheckinIfReservedBehaviour to "Forbid checkin & show
   message"
4. (Staff) Write some text in SCOCheckinIfReservedMessage
5. (Staff) Checkout an item I to patron A
6. (Staff) Place a hold on item I for patron B
7. (SCO) Log in to SCO with patron A
8. (SCO) Try to return item I
   The configured message should be displayed and item I should still be
   checked out
9. (Staff) Set SCOCheckinIfReservedBehaviour to "Allow checkin & show message"
10. (SCO) Try to return item I
    The configured message should be displayed and item I should have
    been checked in
11. (Staff) Checkout item I to patron A again
12. (Staff) Set SCOCheckinIfReservedBehaviour to "Allow checkin"
13. (SCO) Try to return item I
    The configured message should NOT be displayed and item I should
    have been checked in
Comment 2 Lucas Gass (lukeg) 2022-10-12 15:39:33 UTC
I like this but have a couple questions/comments:

1. Should 'SCOCheckinIfReservedMessage' allow the use of HTML?

2. If 'SCOCheckinIfReservedBehaviour' is set to forbid or alert should we also check for the existence of 'SCOCheckinIfReservedMessage' to avoid displaying an empty '<div class="alert alert-warning">'?
Comment 3 Lucas Gass (lukeg) 2024-01-10 23:15:15 UTC
Doesn't apply cleanly anymore.
Comment 4 Baptiste Wojtkowski (bwoj) 2024-07-29 10:25:53 UTC
Created attachment 169820 [details] [review]
Bug 31521: Configure behaviour when checking in a reserved item at SCO

This patch adds a system preference (SCOCheckinIfReservedBehaviour)
which allow to control the behaviour of SCO checkin when the returned
item is reserved:
- allow checkin (current behaviour)
- allow checkin and show a message
- forbid checkin and show a message

The message is configurable is another system preference
(SCOCheckinIfReservedMessage)

Test plan:
1. Apply patch, run updatedatabase.pl and restart koha
2. Enable WebBasedSelfCheck and SCOAllowCheckin
3. (Staff) Set SCOCheckinIfReservedBehaviour to "Forbid checkin & show
   message"
4. (Staff) Write some text in SCOCheckinIfReservedMessage
5. (Staff) Checkout an item I to patron A
6. (Staff) Place a hold on item I for patron B
7. (SCO) Log in to SCO with patron A
8. (SCO) Try to return item I
   The configured message should be displayed and item I should still be
   checked out
9. (Staff) Set SCOCheckinIfReservedBehaviour to "Allow checkin & show message"
10. (SCO) Try to return item I
    The configured message should be displayed and item I should have
    been checked in
11. (Staff) Checkout item I to patron A again
12. (Staff) Set SCOCheckinIfReservedBehaviour to "Allow checkin"
13. (SCO) Try to return item I
    The configured message should NOT be displayed and item I should
    have been checked in
Comment 5 Baptiste Wojtkowski (bwoj) 2024-07-29 10:26:42 UTC
Rebased on master
Comment 6 Sam Lau 2024-08-21 16:48:45 UTC
Created attachment 170572 [details] [review]
Bug 31521: Configure behaviour when checking in a reserved item at SCO

This patch adds a system preference (SCOCheckinIfReservedBehaviour)
which allow to control the behaviour of SCO checkin when the returned
item is reserved:
- allow checkin (current behaviour)
- allow checkin and show a message
- forbid checkin and show a message

The message is configurable is another system preference
(SCOCheckinIfReservedMessage)

Test plan:
1. Apply patch, run updatedatabase.pl and restart koha
2. Enable WebBasedSelfCheck and SCOAllowCheckin
3. (Staff) Set SCOCheckinIfReservedBehaviour to "Forbid checkin & show
   message"
4. (Staff) Write some text in SCOCheckinIfReservedMessage
5. (Staff) Checkout an item I to patron A
6. (Staff) Place a hold on item I for patron B
7. (SCO) Log in to SCO with patron A
8. (SCO) Try to return item I
   The configured message should be displayed and item I should still be
   checked out
9. (Staff) Set SCOCheckinIfReservedBehaviour to "Allow checkin & show message"
10. (SCO) Try to return item I
    The configured message should be displayed and item I should have
    been checked in
11. (Staff) Checkout item I to patron A again
12. (Staff) Set SCOCheckinIfReservedBehaviour to "Allow checkin"
13. (SCO) Try to return item I
    The configured message should NOT be displayed and item I should
    have been checked in

Signed-off-by: Sam Lau <samalau@gmail.com>