[Bug 18494] New: Fix Letters.t (follow-up of 5260)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Bug ID: 18494 Summary: Fix Letters.t (follow-up of 5260) Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: lari.taskula@jns.fi QA Contact: gmcharlt@gmail.com koha@kohacommunity:~/kohaclone$ perl t/db_dependent/Letters.t 1..81 ok 1 - use C4::Context; ok 2 - use C4::Members; ok 3 - use C4::Acquisition; ok 4 - use C4::Biblio; ok 5 - use C4::Letters; Can't call method "get_expiry_date" on an undefined value at /home/koha/kohaclone/C4/Members.pm line 465. # Looks like your test exited with 7 just after 5. Problem is at line: my $patron_category = $builder->build({ source => 'Category' }); Change to: my $patron_category = $builder->build({ source => 'Category' })->{categorycode}; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Depends on| |5260 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5260 [Bug 5260] Add option to send an order by e-mail to the acquisition module -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #1 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62689 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62689&action=edit Bug 18494: Fix Letters.t (follow-up of 5260) koha@kohacommunity:~/kohaclone$ perl t/db_dependent/Letters.t 1..81 ok 1 - use C4::Context; ok 2 - use C4::Members; ok 3 - use C4::Acquisition; ok 4 - use C4::Biblio; ok 5 - use C4::Letters; Can't call method "get_expiry_date" on an undefined value at /home/koha/kohaclone/C4/Members.pm line 465. Looks like your test exited with 7 just after 5. Problem is at line: my $patron_category = $builder->build({ source => 'Category' }); Change to: my $patron_category = $builder->build({ source => 'Category' })->{categorycode}; To test: 1. Before applying patch, run t/db_dependent/Letters.t 2. Observe above failure 3. Apply patch 4. Run t/db_dependent/Letters.t 5. Watch it pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #2 from Lari Taskula <lari.taskula@jns.fi> --- Now that I'm looking at this closer, I don't yet understand why it originally fails. If $patron_category is passed as a hashref to ->find, I'm thinking it should still work... I tested it on another container running with slightly different version and I don't experience this failure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #3 from Lari Taskula <lari.taskula@jns.fi> --- Ah it seems it's broken by Bug 15702 and not Bug 5260. Sorry! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|5260 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5260 [Bug 5260] Add option to send an order by e-mail to the acquisition module -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix Letters.t (follow-up of |Fix Letters.t (follow-up of |5260) |15702) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15702 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15702 [Bug 15702] Trim whitespace from patron details upon submission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62689|0 |1 is obsolete| | --- Comment #4 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62706 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62706&action=edit Bug 18494: Fix Letters.t (follow-up of 15702) koha@kohacommunity:~/kohaclone$ perl t/db_dependent/Letters.t 1..81 ok 1 - use C4::Context; ok 2 - use C4::Members; ok 3 - use C4::Acquisition; ok 4 - use C4::Biblio; ok 5 - use C4::Letters; Can't call method "get_expiry_date" on an undefined value at /home/koha/kohaclone/C4/Members.pm line 465. Looks like your test exited with 7 just after 5. This is caused by the new trimming functionality in AddMember when categorycode is passed as a HASHref. Before trimming, make sure that the value is not a ref. To test: 1. perl t/db_dependent/Letters.t 2. Observe above failure 3. Apply patch 4. Watch it pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62706|0 |1 is obsolete| | --- Comment #5 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62707&action=edit Bug 18494: Fix Letters.t (follow-up of 15702) koha@kohacommunity:~/kohaclone$ perl t/db_dependent/Letters.t 1..81 ok 1 - use C4::Context; ok 2 - use C4::Members; ok 3 - use C4::Acquisition; ok 4 - use C4::Biblio; ok 5 - use C4::Letters; Can't call method "get_expiry_date" on an undefined value at /home/koha/kohaclone/C4/Members.pm line 465. Looks like your test exited with 7 just after 5. This is caused by the new trimming functionality in AddMember when categorycode is passed as a HASHref. Before trimming, make sure that the value is not a ref. To test: 1. perl t/db_dependent/Letters.t 2. Observe above failure 3. Apply patch 4. Watch it pass 5. Also prove t/db_dependent/Members.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62707|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 62749 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62749&action=edit Bug 18494: Fix Letters.t (follow-up of 15702) koha@kohacommunity:~/kohaclone$ perl t/db_dependent/Letters.t 1..81 ok 1 - use C4::Context; ok 2 - use C4::Members; ok 3 - use C4::Acquisition; ok 4 - use C4::Biblio; ok 5 - use C4::Letters; Can't call method "get_expiry_date" on an undefined value at /home/koha/kohaclone/C4/Members.pm line 465. Looks like your test exited with 7 just after 5. This is caused by the new trimming functionality in AddMember when categorycode is passed as a HASHref. Before trimming, make sure that the value is not a ref. To test: 1. perl t/db_dependent/Letters.t 2. Observe above failure 3. Apply patch 4. Watch it pass 5. Also prove t/db_dependent/Members.t NOTE: Oops! Thanks for the fix. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mtompset@hotmail.com --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- As this bug is marked as a follow up of 15702, I did not fail it, when line 299 failed because it crossed the second boundary on the biblio timestamp. Re-running succeeded with no second boundary crossed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Lari Taskula from comment #2)
Now that I'm looking at this closer, I don't yet understand why it originally fails. If $patron_category is passed as a hashref to ->find, I'm thinking it should still work... I tested it on another container running with slightly different version and I don't experience this failure.
Passing categorycode as a hashref seems to be wrong. Why are we fixing this error in the wrong place ? Please convince me before passing qa on this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Assignee|chris@bigballofwax.co.nz |lari.taskula@jns.fi QA Contact|gmcharlt@gmail.com |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Lari Taskula from comment #2)
Now that I'm looking at this closer, I don't yet understand why it originally fails. If $patron_category is passed as a hashref to ->find, I'm thinking it should still work... I tested it on another container running with slightly different version and I don't experience this failure.
Because the builder returns a hash code, when the patron_category is supposed to be a scalar. The solution in comment #0 is correct. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Lari Taskula from comment #2)
I don't yet understand why it originally fails.
Also, there was a double comma. Wrong number of commas do weird things! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 62926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62926&action=edit Bug 18494: Pass a code, not hash & Fix double commas TEST PLAN --------- 1) prove -v t/db_dependent/Letters.t -- fails at test 5 or so. 2) apply patch 3) run step 1 -- success 4) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #12 from M. Tompsett <mtompset@hotmail.com> --- DO NOT APPLY BOTH! The second one is my counter-patch. If that is acceptable. obsolete the first and sign off the second. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=18494 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62749|0 |1 is obsolete| | Attachment #62926|0 |1 is obsolete| | --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 62954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62954&action=edit Bug 18494: Pass a code, not hash & Fix double commas TEST PLAN --------- 1) prove -v t/db_dependent/Letters.t -- fails at test 5 or so. 2) apply patch 3) run step 1 -- success 4) run koha qa test tools Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to M. Tompsett from comment #12)
If that is acceptable. obsolete the first and sign off the second.
Counter patch is a trivial one. Passing QA immediately. First patch obsoleted. If there is a need for it, please open a new report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |enhancement -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- Just noticed that my patch is identical to Lari's first obsoleted patch. Feel free to change author to Lari instead. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Mark! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |Pushed to Stable --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch has been pushed to 16.11.x and will be in 16.11.08. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18494 --- Comment #18 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.13 release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org