Bug 37641

Summary: Add syspref to make claim returned note mandatory
Product: Koha Reporter: Wainui Witika-Park <wainuiwitikapark>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, lucas, rcoert, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 37641: Add syspref to make claim returned note mandatory
Bug 37641: Add syspref to make claim returned note mandatory

Description Wainui Witika-Park 2024-08-14 01:24:41 UTC
A syspref is required to be able to set if you want the note when making a claim to be mandatory
Comment 1 Wainui Witika-Park 2024-08-14 02:57:53 UTC
Created attachment 170302 [details] [review]
Bug 37641: Add syspref to make claim returned note mandatory

To test:
1) Make sure ClaimReturnedLostValue syspref is set
2) Check out an item
3) Go to the account of the borrower who checked out the patron
4) Go to the checkouts table
5) There should be a column "Return claims" with a button "Claims returned"
6) Click the "Claims returned" button
7) Notice the pop up
8) Don't write anything in the note
9) Submit - make the claim
10) Notice it will let you make the claim without putting any notes in
11) Apply patch
12) Enable syspref ClaimReturnedMandatoryNote
13) Do steps 2-9 again
14) Notice it will not let you make the claim without putting any notes in it
15) Extra testing - Disable syspref ClaimReturnedMandatoryNote, run through steps 2-10

Sponsored-by: Pymble Ladies' College
Comment 2 Wainui Witika-Park 2024-08-14 04:45:09 UTC
Created attachment 170304 [details] [review]
Bug 37641: Add syspref to make claim returned note mandatory

To test:
1) Make sure ClaimReturnedLostValue syspref is set
2) Check out an item
3) Go to the account of the borrower who checked out the patron
4) Go to the checkouts table
5) There should be a column "Return claims" with a button "Claims returned"
6) Click the "Claims returned" button
7) Notice the pop up
8) Don't write anything in the note
9) Submit - make the claim
10) Notice it will let you make the claim without putting any notes in
11) Apply patch
12) Enable syspref ClaimReturnedMandatoryNote
13) Do steps 2-9 again
14) Notice it will not let you make the claim without putting any notes in it
15) Extra testing - Disable syspref ClaimReturnedMandatoryNote, run through steps 2-10

Sponsored-by: Pymble Ladies' College
Comment 3 Lucas Gass (lukeg) 2024-08-15 21:46:30 UTC
1. I learned with RequirePaymentType that it is far too easy to circumnavigate a disabled attribute with browser dev tools. See Bug 33176. If you're adding a system preference to enforce the note field then I think it should be checked in the script.

2. Currently there is nothing stopping me from adding the required note via the modal and then going to the Claims tab, editing/deleting the note.
Comment 4 Wainui Witika-Park 2024-08-16 02:32:24 UTC
(In reply to Lucas Gass from comment #3)

Kia ora Lucas, thanks for your message!

> 1. I learned with RequirePaymentType that it is far too easy to
> circumnavigate a disabled attribute with browser dev tools. See Bug 33176.
> If you're adding a system preference to enforce the note field then I think
> it should be checked in the script.

Which script is that?