A new issuing rule will allow to set a maximum of days when suspending patrons.
Created attachment 28169 [details] [review] Bug 12230: Set a maximum suspension days as a new issuing rule This patch adds a new issuing rule: maxsuspensiondays. A new column "Max. suspension duration (day)" appears in the main table of the issuing rules. If this value is filled, on returning an item, a patron won't be suspended longer than this cap. Test plan: 1/ Set "suspension in days" to 2. 2/ Check an item out to a patron and specify a due date to today - 10 days. 3/ Check the item in and verify the patron is suspended until today + 10 * 2 days. 4/ Remove the suspension. 5/ Set "Max. suspension duration" to 10. 6/ Check an item out to a patron and specify a due date to today - 10 days. 7/ Check the item in and verify the patron is suspended until today + 10 days.
Created attachment 28170 [details] [review] Bug 12230: DB changes - add issuingrules.maxsuspensiondays
Created attachment 28171 [details] [review] Bug 12230: maxsuspensiondays should be set to NULL if not set
I apply against master 3.15.00.051 I see the new "Max. suspension duration (day)" column in the "Circulation and fines rules" table. But I can't set "suspension in days" to 2: after selecting "Save", it remains at 0. [No value of the raw can be changed by "Save".] So I pass the patch to "Failed QA" status.
Created attachment 28196 [details] [review] Bug 12230: Set a maximum suspension days as a new issuing rule This patch adds a new issuing rule: maxsuspensiondays. A new column "Max. suspension duration (day)" appears in the main table of the issuing rules. If this value is filled, on returning an item, a patron won't be suspended longer than this cap. Test plan: 1/ Set "suspension in days" to 2. 2/ Check an item out to a patron and specify a due date to today - 10 days. 3/ Check the item in and verify the patron is suspended until today + 10 * 2 days. 4/ Remove the suspension. 5/ Set "Max. suspension duration" to 10. 6/ Check an item out to a patron and specify a due date to today - 10 days. 7/ Check the item in and verify the patron is suspended until today + 10 days.
Created attachment 28197 [details] [review] Bug 12230: DB changes - add issuingrules.maxsuspensiondays
Created attachment 28198 [details] [review] Bug 12230: maxsuspensiondays should be set to NULL if not set
(In reply to Paola Rossi from comment #4) > I see the new "Max. suspension duration (day)" column in the "Circulation > and fines rules" table. > But I can't set "suspension in days" to 2: after selecting "Save", it > remains at 0. > [No value of the raw can be changed by "Save".] Sorry I just tested the edit. It should work now.
I'm sorry, but the patch doesn't work yet. In master I can "Edit" a rule, change some values, "Save" my changes. Then I see the changed rule listed in the table. In master I can add a new rule: I set "Patron category" AND/OR "Item type" values etc, and I "Save". Then I see this new rule listed in the table as a row. When I test the patch (in FF or Explorer), I can't modify or add a new rule: after "Save", I see the same rules as before. I can only "Delete" a pre-existent rule. So I can't: 1/ Set "suspension in days" to 2. So I pass the patch to "Failed QA" status.
Sorry! There was a problem with upgrading the version. So the status is back to Needs Signoff.
I pass the patch to "Signed Off" status.
Created attachment 28254 [details] [review] Bug 12230: Set a maximum suspension days as a new issuing rule This patch adds a new issuing rule: maxsuspensiondays. A new column "Max. suspension duration (day)" appears in the main table of the issuing rules. If this value is filled, on returning an item, a patron won't be suspended longer than this cap. Test plan: 1/ Set "suspension in days" to 2. 2/ Check an item out to a patron and specify a due date to today - 10 days. 3/ Check the item in and verify the patron is suspended until today + 10 * 2 days. 4/ Remove the suspension. 5/ Set "Max. suspension duration" to 10. 6/ Check an item out to a patron and specify a due date to today - 10 days. 7/ Check the item in and verify the patron is suspended until today + 10 days. Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Created attachment 28255 [details] [review] Bug 12230: DB changes - add issuingrules.maxsuspensiondays Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Created attachment 28256 [details] [review] Bug 12230: maxsuspensiondays should be set to NULL if not set Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
(In reply to Paola Rossi from comment #11) > I pass the patch to "Signed Off" status. Thank you for testing Paola, I added your signoff to the patches.
Created attachment 28257 [details] [review] 1 Set a maximum suspension days as a new issuing rule
Created attachment 28258 [details] [review] 2 DB changes - add issuingrules.maxsuspensiondays
Created attachment 28259 [details] [review] 3 maxsuspensiondays should be set to NULL if not set
Created attachment 28295 [details] [review] [PASSED QA] Bug 12230: Set a maximum suspension days as a new issuing rule This patch adds a new issuing rule: maxsuspensiondays. A new column "Max. suspension duration (day)" appears in the main table of the issuing rules. If this value is filled, on returning an item, a patron won't be suspended longer than this cap. Test plan: 1/ Set "suspension in days" to 2. 2/ Check an item out to a patron and specify a due date to today - 10 days. 3/ Check the item in and verify the patron is suspended until today + 10 * 2 days. 4/ Remove the suspension. 5/ Set "Max. suspension duration" to 10. 6/ Check an item out to a patron and specify a due date to today - 10 days. 7/ Check the item in and verify the patron is suspended until today + 10 days. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 28296 [details] [review] [PASSED QA] Bug 12230: DB changes - add issuingrules.maxsuspensiondays Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 28297 [details] [review] [PASSED QA] Bug 12230: maxsuspensiondays should be set to NULL if not set Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master. Thanks, Jonathan!