Bug 12230 - Add maximum suspension days as a new issuing rule
Summary: Add maximum suspension days as a new issuing rule
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 12406
  Show dependency treegraph
 
Reported: 2014-05-12 10:24 UTC by Jonathan Druart
Modified: 2015-06-04 23:33 UTC (History)
3 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 12230: Set a maximum suspension days as a new issuing rule (11.18 KB, patch)
2014-05-12 10:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: DB changes - add issuingrules.maxsuspensiondays (1.75 KB, patch)
2014-05-12 10:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: maxsuspensiondays should be set to NULL if not set (887 bytes, patch)
2014-05-12 10:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: Set a maximum suspension days as a new issuing rule (11.18 KB, patch)
2014-05-13 07:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: DB changes - add issuingrules.maxsuspensiondays (1.75 KB, patch)
2014-05-13 07:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: maxsuspensiondays should be set to NULL if not set (887 bytes, patch)
2014-05-13 07:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: Set a maximum suspension days as a new issuing rule (11.24 KB, patch)
2014-05-14 09:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: DB changes - add issuingrules.maxsuspensiondays (1.80 KB, patch)
2014-05-14 09:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12230: maxsuspensiondays should be set to NULL if not set (938 bytes, patch)
2014-05-14 09:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
1 Set a maximum suspension days as a new issuing rule (11.46 KB, patch)
2014-05-14 09:44 UTC, Paola Rossi
Details | Diff | Splinter Review
2 DB changes - add issuingrules.maxsuspensiondays (1.86 KB, patch)
2014-05-14 09:45 UTC, Paola Rossi
Details | Diff | Splinter Review
3 maxsuspensiondays should be set to NULL if not set (972 bytes, patch)
2014-05-14 09:46 UTC, Paola Rossi
Details | Diff | Splinter Review
[PASSED QA] Bug 12230: Set a maximum suspension days as a new issuing rule (11.30 KB, patch)
2014-05-16 11:46 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[PASSED QA] Bug 12230: DB changes - add issuingrules.maxsuspensiondays (1.88 KB, patch)
2014-05-16 11:47 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[PASSED QA] Bug 12230: maxsuspensiondays should be set to NULL if not set (1022 bytes, patch)
2014-05-16 11:47 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2014-05-12 10:24:07 UTC
A new issuing rule will allow to set a maximum of days when suspending patrons.
Comment 1 Jonathan Druart 2014-05-12 10:39:12 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-05-12 10:40:56 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-05-12 10:59:09 UTC Comment hidden (obsolete)
Comment 4 Paola Rossi 2014-05-12 15:40:32 UTC
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.
Comment 5 Jonathan Druart 2014-05-13 07:08:38 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2014-05-13 07:08:42 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2014-05-13 07:08:46 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2014-05-13 07:10:03 UTC
(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.
Comment 9 Paola Rossi 2014-05-13 11:30:09 UTC
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.
Comment 10 Paola Rossi 2014-05-13 13:17:51 UTC
Sorry! There was a problem with upgrading the version.

So the status is back to Needs Signoff.
Comment 11 Paola Rossi 2014-05-14 09:36:06 UTC
I pass the patch to "Signed Off" status.
Comment 12 Jonathan Druart 2014-05-14 09:41:54 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2014-05-14 09:41:58 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2014-05-14 09:42:02 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2014-05-14 09:42:43 UTC
(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.
Comment 16 Paola Rossi 2014-05-14 09:44:19 UTC Comment hidden (obsolete)
Comment 17 Paola Rossi 2014-05-14 09:45:18 UTC Comment hidden (obsolete)
Comment 18 Paola Rossi 2014-05-14 09:46:09 UTC Comment hidden (obsolete)
Comment 19 Kyle M Hall (khall) 2014-05-16 11:46:52 UTC
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>
Comment 20 Kyle M Hall (khall) 2014-05-16 11:47:01 UTC
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>
Comment 21 Kyle M Hall (khall) 2014-05-16 11:47:39 UTC
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>
Comment 22 Galen Charlton 2014-05-26 02:07:56 UTC
Pushed to master.  Thanks, Jonathan!