[Bug 38287] New: Saving Default checkout, hold and return policy with empty bookings values causes error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Bug ID: 38287 Summary: Saving Default checkout, hold and return policy with empty bookings values causes error Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Depends on: 34440 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34440 [Bug 34440] Add warm-up and cool-down periods to bookings -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 --- Comment #1 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173648&action=edit Bug 38287: Add missing rule_value access Test plan: 1) Access circuation rules: http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 2) Scroll down to "Default checkout, hold and return policy". Enter nothing. Hit 'Save'. 3) Notice on page reload there is a Koha:: object on the bookings inputs 4) Save again -> ERROR 5) Apply patch. Repeat. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 --- Comment #2 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 173649 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173649&action=edit Bug 38287: Clean-up unecessary input values These are inputs for new entries, no values are shown or needed here -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pedro.amorim@ptfs-europe.co |ity.org |m CC| |pedro.amorim@ptfs-europe.co | |m Patch complexity|--- |Trivial patch Circulation| |bookings function| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173648|0 |1 is obsolete| | --- Comment #3 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 173681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173681&action=edit Bug 38287: Add missing rule_value access Test plan: 1) Access circuation rules: http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 2) Scroll down to "Default checkout, hold and return policy". Enter nothing. Hit 'Save'. 3) Notice on page reload there is a Koha:: object on the bookings inputs 4) Save again -> ERROR 5) Apply patch. Repeat. Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173649|0 |1 is obsolete| | --- Comment #4 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 173682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173682&action=edit Bug 38287: Clean-up unecessary input values These are inputs for new entries, no values are shown or needed here Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 SamSowanick <sam.sowanick@corvallisoregon.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sam.sowanick@corvallisorego | |n.gov 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=38287 Aleisha Amohia <aleisha@catalyst.net.nz> 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=38287 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173681|0 |1 is obsolete| | --- Comment #5 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 173743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173743&action=edit Bug 38287: Add missing rule_value access Test plan: 1) Access circuation rules: http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 2) Scroll down to "Default checkout, hold and return policy". Enter nothing. Hit 'Save'. 3) Notice on page reload there is a Koha:: object on the bookings inputs 4) Save again -> ERROR 5) Apply patch. Repeat. Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173682|0 |1 is obsolete| | --- Comment #6 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 173744 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173744&action=edit Bug 38287: Clean-up unecessary input values These are inputs for new entries, no values are shown or needed here Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz QA Contact|testopia@bugs.koha-communit |aleisha@catalyst.net.nz |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Saving Default checkout, |Saving default checkout, |hold and return policy with |hold and return policy with |empty bookings values |empty bookings values |causes error |causes error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I wonder if we are quite there yet here. I had added a rule leaving one field empty, but now the tests fail. Can you please check, Martin? Maybe there is more needed here. # Failed test 'Koha::Item->find_booking returns undefined when the current booking is cancelled and the future booking is out of range' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3022. # got: 'Koha::Booking=HASH(0x55691b45d918)' # expected: undef # Failed test 'Koha::Item->find_booking returns undefined when the current booking is deleted and the future booking is out of range and there's no lead period rule' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3040. # got: 'Koha::Booking=HASH(0x55691b30fc00)' # expected: undef # Looks like you failed 1 test of 3. # Failed test 'Preparation period handling' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3074. # Looks like you failed 2 tests of 8. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #8 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- (In reply to Katrin Fischer from comment #7)
I wonder if we are quite there yet here. I had added a rule leaving one field empty, but now the tests fail. Can you please check, Martin? Maybe there is more needed here.
# Failed test 'Koha::Item->find_booking returns undefined when the current booking is cancelled and the future booking is out of range' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3022. # got: 'Koha::Booking=HASH(0x55691b45d918)' # expected: undef
# Failed test 'Koha::Item->find_booking returns undefined when the current booking is deleted and the future booking is out of range and there's no lead period rule' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3040. # got: 'Koha::Booking=HASH(0x55691b30fc00)' # expected: undef # Looks like you failed 1 test of 3.
# Failed test 'Preparation period handling' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3074. # Looks like you failed 2 tests of 8.
This does not seem related. Tests pass for me before and applying the patches here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Pedro Amorim from comment #8)
(In reply to Katrin Fischer from comment #7)
I wonder if we are quite there yet here. I had added a rule leaving one field empty, but now the tests fail. Can you please check, Martin? Maybe there is more needed here.
# Failed test 'Koha::Item->find_booking returns undefined when the current booking is cancelled and the future booking is out of range' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3022. # got: 'Koha::Booking=HASH(0x55691b45d918)' # expected: undef
# Failed test 'Koha::Item->find_booking returns undefined when the current booking is deleted and the future booking is out of range and there's no lead period rule' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3040. # got: 'Koha::Booking=HASH(0x55691b30fc00)' # expected: undef # Looks like you failed 1 test of 3.
# Failed test 'Preparation period handling' # at /kohadevbox/koha/t/db_dependent/Koha/Item.t line 3074. # Looks like you failed 2 tests of 8.
This does not seem related. Tests pass for me before and applying the patches here.
You need to add data, not just run the tests. With the patch applied, add a rule that leaves these fields empty. Before the patch, the rule would not save, but now it does. Run the test after. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 --- Comment #10 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- (In reply to Katrin Fischer from comment #9)
You need to add data, not just run the tests. With the patch applied, add a rule that leaves these fields empty. Before the patch, the rule would not save, but now it does. Run the test after.
I'm sorry, still can't reproduce. $ prove t/db_dependent/Koha/Item.t This is always passing for me. Before and after applying patch. Before and after adding "Default checkout, hold and return policy" with empty values for bookings input and different values for "Hold policy" and "Hold pickup library match". I'm clearly missing something, can you please clarify further. I want to understand how changes to a .tt file would break (or cause any change) to a Koha class .t tests file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've retested and I can't replicate the error now. Maybe it was resolved by some of the other bookings work pushed? What I was thinking is: * Before the patch you are prevented from adding empty cells (they don't save) * After the patch they can be saved. * So I had assumed that the data was breaking the test as we have no validation for these fields. I have filed a separate bug asking for validation as you can currently also add "a" as a value. (bug 38308) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |lucas@bywatersolutions.com Status|Pushed to main |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38287 Bug 38287 depends on bug 34440, which changed state. Bug 34440 Summary: Add warm-up and cool-down periods to bookings https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34440 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org