[Bug 22847] New: Specific circ rule by patron category is displaying the default (or not displaying)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Bug ID: 22847 Summary: Specific circ rule by patron category is displaying the default (or not displaying) Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: critical Priority: P5 - low Component: System Administration Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Depends on: 18887, 18925 Target Milestone: --- There are several things going wrong on the circulation rules screen. The global rule is displayed for specific libraries (even if the rule does not exist for the library), and max_holds is always blank. I have trouble finding the root of the issue, but I will propose a patch to fix both problem. Certainly a mismatch between bug 18887 and bug 18925. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18887 [Bug 18887] Introduce new table 'circulation_rules', use for 'max_holds' rules https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18925 [Bug 18925] Move maxissueqty and maxonsiteissueqty to circulation_rules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89335&action=edit Bug 22847: Correctly displayed circ rule values for max_holds and maxissue* There are several things going wrong on the circulation rules screen. The global rule is displayed for specific libraries (even if the rule does not exist for the library), and max_holds is always blank. I have trouble finding the root of the issue, but I will propose a patch to fix both problem. Certainly a mismatch between bug 18887 and bug 18925. Test plan: 0. Do not apply the patch 1. Notice the issue on the circulation rules screen 2. Apply the patch 3. Confirm that the value you set are correctly displayed (and not the propagated ones!) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_19_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89335|0 |1 is obsolete| | --- Comment #2 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 89373 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89373&action=edit Bug 22847: Correctly displayed circ rule values for max_holds and maxissue* There are several things going wrong on the circulation rules screen. The global rule is displayed for specific libraries (even if the rule does not exist for the library), and max_holds is always blank. I have trouble finding the root of the issue, but I will propose a patch to fix both problem. Certainly a mismatch between bug 18887 and bug 18925. Test plan: 0. Do not apply the patch 1. Notice the issue on the circulation rules screen 2. Apply the patch 3. Confirm that the value you set are correctly displayed (and not the propagated ones!) Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18928 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18928 [Bug 18928] Move holdallowed, hold_fulfillment_policy, returnbranch to circulation_rules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89373|0 |1 is obsolete| | --- Comment #3 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 89401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89401&action=edit Bug 22847: Correctly displayed circ rule values for max_holds and maxissue* There are several things going wrong on the circulation rules screen. The global rule is displayed for specific libraries (even if the rule does not exist for the library), and max_holds is always blank. I have trouble finding the root of the issue, but I will propose a patch to fix both problem. Certainly a mismatch between bug 18887 and bug 18925. Test plan: 0. Do not apply the patch 1. Notice the issue on the circulation rules screen 2. Apply the patch 3. Confirm that the value you set are correctly displayed (and not the propagated ones!) Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89401|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 89439 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89439&action=edit Bug 22847: Correctly displayed circ rule values for max_holds and maxissue* There are several things going wrong on the circulation rules screen. The global rule is displayed for specific libraries (even if the rule does not exist for the library), and max_holds is always blank. I have trouble finding the root of the issue, but I will propose a patch to fix both problem. Certainly a mismatch between bug 18887 and bug 18925. Test plan: 0. Do not apply the patch 1. Notice the issue on the circulation rules screen 2. Apply the patch 3. Confirm that the value you set are correctly displayed (and not the propagated ones!) Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89863&action=edit Bug 22847: [18.11] Correctly displayed circ rule values for max_holds Here a version for 18.11, it needs a signoff! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Victor Grousset/tuxayo <victor.grousset@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor.grousset@biblibre.co | |m --- Comment #7 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- 1. Fill the 3 fields of Default checkout, hold and return policy 2. Same for a particular library with different values 3. Unset the policy for the particular library 4. Then you will see that the field "Maximum total holds allowed (count)" ends up with the value for all libraries policy 5. Change the value for all libraries policy, then return to the particular library 6. You should see that the value was updated as well 7. Which is wrooooooong 8. Apply the patch 9. You should see that the particular library policy is empty 10. You should see in the all lib policy that the "Maximum total holds allowed (count)" field is not empty - Is that expected??? 11. Refill all the fields 12. Then you should see that for both policies, "Maximum total holds allowed (count)" stays empty 13. Wait this is definitely not supposed to happen! 14. Nooooooooooo! T_T -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looks like this isn't ready for 18.11.x yet.. setting to needs-more-work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #9 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- I'm investigating why does the UNIMARC dump fails since this was merged in master. (MARC21 upgrades fine) http://git.koha-community.org/gitweb/?p=contrib/global.git;a=history;f=sandb... logs: Upgrade to 18.12.00.019 done (Bug 21728 - Add 'Reserve Fee' to the account_offset_types table if missing) DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha`.`circulation_rules`, CONSTRAINT `circ_rules_ibfk_3` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement " INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) SELECT IF(categorycode='*', NULL, categorycode), IF(branchcode='*', NULL, branchcode), IF(itemtype='*', NULL, itemtype), 'maxissueqty', COALESCE( maxissueqty, '' ) FROM issuingrules "] at /home/koha/src/installer/data/mysql/updatedatabase.pl line 17537. DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha`.`circulation_rules`, CONSTRAINT `circ_rules_ibfk_3` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement " INSERT INTO circulation_rules ( categorycode, branchcode, itemtype, rule_name, rule_value ) SELECT IF(categorycode='*', NULL, categorycode), IF(branchcode='*', NULL, branchcode), IF(itemtype='*', NULL, itemtype), 'maxonsiteissueqty', COALESCE( maxonsiteissueqty, '' ) FROM issuingrules "] at /home/koha/src/installer/data/mysql/updatedatabase.pl line 17546. Upgrade to 18.12.00.020 done (Bug 18925 - Move maxissueqty and maxonsiteissueqty to circulation_rules) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #10 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- My bad, wrong bugzilla. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Victor Grousset/tuxayo from comment #7) I do not understand what you is trying to show.
10. You should see in the all lib policy that the "Maximum total holds allowed (count)" field is not empty - Is that expected???
Yes of course, what do you expect? I contain the value you filled in before.
11. Refill all the fields
Which ones? For "all" they are already filled.
12. Then you should see that for both policies, "Maximum total holds allowed (count)" stays empty
Nope, I see what I just entered. All good for me, please retest. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Victor Grousset/tuxayo from comment #7) I do not understand what you are trying to show.
10. You should see in the all lib policy that the "Maximum total holds allowed (count)" field is not empty - Is that expected???
Yes of course, what do you expect? I contain the value you filled in before.
11. Refill all the fields
Which ones? For "all" they are already filled.
12. Then you should see that for both policies, "Maximum total holds allowed (count)" stays empty
Nope, I see what I just entered. All good for me, please retest. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable Version(s)| |19.05.00, 18.11.06 released in| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm going to go for it here.. I can't replicate any issues once Jonathans patch is applied.. Thanks for your efforts in reworking it for 18.11.x series. Pushed to 18.11.x for 18.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #14 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- (In reply to Jonathan Druart from comment #12)
(In reply to Victor Grousset/tuxayo from comment #7)
10. You should see in the all lib policy that the "Maximum total holds allowed (count)" field is not empty - Is that expected???
Yes of course, what do you expect? I contain the value you filled in before.
Okay so the patch manages to display the value that in the previous version was still saved but not displayed. I didn't understood this, so it seemed that the patch was changing the config.
11. Refill all the fields
Which ones? For "all" they are already filled.
"Default checkout, hold and return policy" It was to test if changing the values still worked.
12. Then you should see that for both policies, "Maximum total holds allowed (count)" stays empty
Nope, I see what I just entered.
All good for me, please retest.
It might have an issue with my setup or misunderstood something functionally when trying to guess some details of the test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 --- Comment #15 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- Thanks Joubu for the patch. Thanks Martin for retesting. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Bug 22847 depends on bug 18925, which changed state. Bug 18925 Summary: Move maxissueqty and maxonsiteissueqty to circulation_rules https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18925 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Bug 22847 depends on bug 18925, which changed state. Bug 18925 Summary: Move maxissueqty and maxonsiteissueqty to circulation_rules https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18925 What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed, | |rel_19_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24026 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24026 [Bug 24026] Wrong parameters in Koha/Templates/Plugin/CirculationRules.pm and smart-rules.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22847 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|18887 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18887 [Bug 18887] Introduce new table 'circulation_rules', use for 'max_holds' rules -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org