[Bug 9074] New: DB dependent tests for is_holiday
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Priority: P5 - low Change sponsored?: --- Bug ID: 9074 Assignee: koha-bugs@lists.koha-community.org Summary: DB dependent tests for is_holiday Severity: enhancement Classification: Unclassified OS: All Reporter: tomascohen@gmail.com Hardware: All Status: NEW Version: master Component: Holidays Product: Koha We need several de-dependent tests for is_holiday. We currently only have sample data and tests for repeteable holidays. Missing: - special holidays - exception holidays -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 13451 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13451&action=edit Bug 9074 - DB dependent tests for is_holiday Some DB dependent tests for: - Special holidays - Exception holidays I added a test for a bug introduced by 8966. Sponsored-by: Universidad Nacional de Córdoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- The test for holiday exceptions fails, because of bug 9078 for which I'm providing a patch in a moment. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to comment #2)
The test for holiday exceptions fails, because of bug 9078 for which I'm providing a patch in a moment.
Forgot to tell that this was built against master with 8800 patch. Otherwise the test for that truncation problem fails. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9078 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |8800 Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |kyle@bywatersolutions.com --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- git am -s /tmp/Bug-9074---DB-dependent-tests-for-isholiday-eiKuaq.patch Applying: Bug 9074 - DB dependent tests for is_holiday /home/koha/kohaclone/.git/rebase-apply/patch:101: trailing whitespace. INSERT INTO `repeatable_holidays` VALUES /home/koha/kohaclone/.git/rebase-apply/patch:134: trailing whitespace. SET FOREIGN_KEY_CHECKS=1;INSERT INTO `repeatable_holidays` VALUES /home/koha/kohaclone/.git/rebase-apply/patch:225: trailing whitespace. INSERT INTO `repeatable_holidays` VALUES /home/koha/kohaclone/.git/rebase-apply/patch:282: trailing whitespace. # is_holiday truncates the date to day as that's error: patch failed: installer/data/mysql/en/optional/sample_holidays.txt:1 error: installer/data/mysql/en/optional/sample_holidays.txt: patch does not apply /home/koha/kohaclone/.git/rebase-apply/patch:258: new blank line at EOF. + Patch failed at 0001 Bug 9074 - DB dependent tests for is_holiday -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13451|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13586 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13586&action=edit Bug 9074 - DB dependent tests for is_holiday Some DB dependent tests for: - Special holidays - Exception holidays I added a test for a bug introduced by 8966. Sponsored-by: Universidad Nacional de Córdoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Here is my output. I'm not sure if this is an error with the test, or an error in the code. perl t/db_dependent/Holidays.t 1..11 ok 1 - use Koha::Calendar; ok 2 - use C4::Calendar; ok 3 - Koha::Calendar class returned isa Koha::Calendar ok 4 - C4::Calendar class returned isa C4::Calendar ok 5 - Sunday is a closed day ok 6 - Monday is not a closed day ok 7 - Christmas is a closed day ok 8 - New Years day is a closed day ok 9 - Sample single holiday is a closed day not ok 10 - Sample sunday exception is not a closed day # Failed test 'Sample sunday exception is not a closed day' # at t/db_dependent/Holidays.t line 59. # got: '1' # expected: '0' not ok 11 - is_holiday should truncate the date for holiday validation # Failed test 'is_holiday should truncate the date for holiday validation' # at t/db_dependent/Holidays.t line 73. # got: '0' # expected: '1' # Looks like you failed 2 tests of 11. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13587 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13587&action=edit Bug 9074 - DB dependent tests for is_holiday Some DB dependent tests for: - Special holidays - Exception holidays I added a test for a bug introduced by 8966. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13586|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Tests are failing due to bad code, the tests are good. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13587|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13609 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13609&action=edit Bug 9074 - DB dependent tests for is_holiday Some DB dependent tests for: - Special holidays - Exception holidays I added a test for a bug introduced by 8966. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Tomas, I am wondering if adding the holidays to all the translated sample data is necessary. Also a bit worried because it includes a branchcode, that I think we might need, but it is not there in most of the non-english sample holidays. Do we need to clean them up? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Katrin, we could just empty the MPL string, the only side effect would be that holidays will be set for all branches. Could it be done by the signer or should I provide a new patch? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I wonder if we should have that kind of data if it's not possible to recraete it from the interface. I tried adding a holiday with an empty branchcode - if you select 'copy to all branches' in the database an entry for each branchcode is created. So it seems our test data is wrong? I am not sure what to do here, I will concentrate on testing 8800 for now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- in conjunction with patches from 9078 please! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13609|0 |1 is obsolete| | --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 13634 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13634&action=edit Bug 9074 - DB dependent tests for is_holiday Some DB dependent tests for: - Special holidays - Exception holidays I added a test for a bug introduced by 8966. Languages that don't provide the MPL branch in their sample data are ommited. Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Bug 9074 depends on bug 8800, which changed state. Bug 8800 Summary: SpecifyDueDate && useDaysMode=Datedue wrong behaviour http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8800 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion Patch complexity|--- |Trivial patch --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I would like to change this to 'in discussion' for now - please feel free to object. Tomas has thankfully brought up the topic on the mailing list: http://lists.koha-community.org/pipermail/koha-devel/2012-November/038525.ht... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9074 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |WONTFIX --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This bug is not being discussed. As I said in Bug 9133 we need a data set for testing purposes. That's where this should fit instead of the default standard example values. That said, I mark this resolved wontfix. If anyone feels this should be different, just change the status. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org