Bug 25400 - Circulation and fine rules cloning from one table to another does not copy "current checkouts allowed"
Summary: Circulation and fine rules cloning from one table to another does not copy "c...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: 19.11
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-06 20:18 UTC by Joe Sikowitz
Modified: 2020-11-30 21:47 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.06, 19.05.11
Circulation function:


Attachments
Example of original circ rules (72.96 KB, image/jpeg)
2020-05-06 20:19 UTC, Joe Sikowitz
Details
Example of cloned circ rules (76.69 KB, image/jpeg)
2020-05-06 20:20 UTC, Joe Sikowitz
Details
Bug 25400: [< 20.05] Fix cloning of circulation rules (1.53 KB, patch)
2020-05-08 10:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25400: [< 20.05] Fix cloning of circulation rules (1.55 KB, patch)
2020-05-11 08:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25400: [< 20.05] Fix cloning of circulation rules (1.64 KB, patch)
2020-05-14 20:01 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Sikowitz 2020-05-06 20:18:50 UTC
To recreate this issue:

1. Create a rule in the main Circulation and Fines Rules table and provide a value for Current checkouts allowed such as 10.
2. Use the clone option to clone the rule you created to another library's table.
3. View the clone's table.
4. You should see that in the Current checkouts allowed column in the clone library that the value is now Unlimited.

Cloning should copy all of the values from one library to another.

See attached screenshots for an example.
Comment 1 Joe Sikowitz 2020-05-06 20:19:38 UTC
Created attachment 104455 [details]
Example of original circ rules
Comment 2 Joe Sikowitz 2020-05-06 20:20:18 UTC
Created attachment 104456 [details]
Example of cloned circ rules
Comment 3 Katrin Fischer 2020-05-06 22:01:18 UTC
Hi Joe, I think this is a duplicate of the very old bug 4225. Do you agree?
Comment 4 Jonathan Druart 2020-05-07 11:47:32 UTC
Joe, it works for me, which exact version of Koha are you using?
Comment 5 Joe Sikowitz 2020-05-07 13:04:27 UTC
Hi Katrin, I looked at bug 4225 and it does look similar. I wasn't sure what only cloning the "top table" of rules meant since the bug I identified deals with the top most table on the page. That's why I submitted a new bug.

Hi Jonathan, I am using Koha 19.05.09.000 and still seeing this issue.
Comment 6 Katrin Fischer 2020-05-07 21:35:19 UTC
(In reply to Joe Sikowitz from comment #5)
> Hi Katrin, I looked at bug 4225 and it does look similar. I wasn't sure what
> only cloning the "top table" of rules meant since the bug I identified deals
> with the top most table on the page. That's why I submitted a new bug.
> 
> Hi Jonathan, I am using Koha 19.05.09.000 and still seeing this issue.

Ah, sorry then! We also got the current checkouts in the tables below, should have checked more closely!
Comment 7 Jonathan Druart 2020-05-08 10:15:38 UTC
Created attachment 104577 [details] [review]
Bug 25400: [< 20.05] Fix cloning of circulation rules

This patch is for 19.11 and anterior versions.

The clone functionnality does not clone the "already moved rules"
maxissueqty and maxonsiteissueqty.

Test plan:
Clone some circ rules from one branch to another
Confirm that all the rules have been copied correctly
Comment 8 Katrin Fischer 2020-05-09 22:13:05 UTC
Hi Jonathan, I've tested this, but it doesn't work for me when I copy from "All libraries" to any other library. Copying from library A to library B works well.
Comment 9 Jonathan Druart 2020-05-11 08:18:54 UTC
Created attachment 104654 [details] [review]
Bug 25400: [< 20.05] Fix cloning of circulation rules

This patch is for 19.11 and anterior versions.

The clone functionnality does not clone the "already moved rules"
maxissueqty and maxonsiteissueqty.

Test plan:
Clone some circ rules from one branch to another
Confirm that all the rules have been copied correctly
Comment 10 Jonathan Druart 2020-05-11 08:19:26 UTC
(In reply to Katrin Fischer from comment #8)
> Hi Jonathan, I've tested this, but it doesn't work for me when I copy from
> "All libraries" to any other library. Copying from library A to library B
> works well.

Indeed, should be fixed now.
Comment 11 Bernardo Gonzalez Kriegel 2020-05-14 20:01:38 UTC
Created attachment 104899 [details] [review]
Bug 25400: [< 20.05] Fix cloning of circulation rules

This patch is for 19.11 and anterior versions.

The clone functionnality does not clone the "already moved rules"
maxissueqty and maxonsiteissueqty.

Test plan:
Clone some circ rules from one branch to another
Confirm that all the rules have been copied correctly

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on 19.11, no errors
Comment 12 Joy Nelson 2020-05-19 23:21:21 UTC
Pushed to 19.11.x for 19.11.06
Comment 13 Lucas Gass (lukeg) 2020-05-22 14:43:40 UTC
backported to 19.05.x for 19.05.11