If I edit a circulation rule with a value of 0 or higher in the 'Holds allowed (total)' column, Koha is populating the 'No automatic renewal after (hard limit)' with a date when it was/should remain blank for editing. Also, the value in 'Holds allowed (total)' isn't populating in the editing line. To replicate: -Find or create a circulation rule with a 'Holds allowed (total)' limit of 3 (or another number) and no value in 'No automatic renewal after (hard limit)' -Select to edit the rule, and note that 'No automatic renewal after (hard limit)' box in the editing line is now populated with a date -Note also that 'Holds allowed (total)' is empty in your editing line -If you save your edits without clearing the new 'No automatic renewal after (hard limit)' date, it will save as part of the rule. Also, 'Holds allowed (total)' will save as Unlimited unless you re-add your numerical value. This happened when I tested with multiple numbers including 0.
I can replicate this on 23.05.10 but not on 23.11.03 so this may have been resolved elsewhere?
This is a 23.05.x regression caused by Bug 35341. It is that plus the fact that Bug 8367 ( which added an extra column ) was not backported to 23.05.x that is causing this.
Created attachment 165749 [details] [review] Bug 36708: Fix column index for processing No automatic renewal after To test: 1- Find or create a circulation rule with a 'Holds allowed (total)' limit of 3 (or another number) and no value in 'No automatic renewal after (hard limit)' 2- Select to edit the rule, and note that 'No automatic renewal after (hard limit)' box in the editing line is now populated with a date 3- Note also that 'Holds allowed (total)' is empty in your editing line 4- If you save your edits without clearing the new 'No automatic renewal after (hard limit)' date, it will save as part of the rule. Also, 'Holds allowed (total)' will save as Unlimited unless you re-add your numerical value. 5- APPLY PATCH 6- Try again, the values should save corrected and not erroneously fill the No automatic renewal after (hard limit) column.
Created attachment 166232 [details] [review] Bug 36708: Fix column index for processing No automatic renewal after To test: 1- Find or create a circulation rule with a 'Holds allowed (total)' limit of 3 (or another number) and no value in 'No automatic renewal after (hard limit)' 2- Select to edit the rule, and note that 'No automatic renewal after (hard limit)' box in the editing line is now populated with a date 3- Note also that 'Holds allowed (total)' is empty in your editing line 4- If you save your edits without clearing the new 'No automatic renewal after (hard limit)' date, it will save as part of the rule. Also, 'Holds allowed (total)' will save as Unlimited unless you re-add your numerical value. 5- APPLY PATCH 6- Try again, the values should save corrected and not erroneously fill the No automatic renewal after (hard limit) column. Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Created attachment 166622 [details] [review] Bug 36708: Fix column index for processing No automatic renewal after To test: 1- Find or create a circulation rule with a 'Holds allowed (total)' limit of 3 (or another number) and no value in 'No automatic renewal after (hard limit)' 2- Select to edit the rule, and note that 'No automatic renewal after (hard limit)' box in the editing line is now populated with a date 3- Note also that 'Holds allowed (total)' is empty in your editing line 4- If you save your edits without clearing the new 'No automatic renewal after (hard limit)' date, it will save as part of the rule. Also, 'Holds allowed (total)' will save as Unlimited unless you re-add your numerical value. 5- APPLY PATCH 6- Try again, the values should save corrected and not erroneously fill the No automatic renewal after (hard limit) column. Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Good catch and fix, thanks. Passing QA
I wonder if this will always work - we should not using the index numbers but an identifier. We do now have some columns in this table where the visibility depends on system preferences (like UseRecalls)
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06
Backported to 23.05.x for upcoming 23.05.12