A syspref is required to be able to set if you want the note when making a claim to be mandatory
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
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
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.
(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?