[Bug 18299] New: Removal of SQL queries from admin/ env_tz_test.pl script into a perl module
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Bug ID: 18299 Summary: Removal of SQL queries from admin/env_tz_test.pl script into a perl module Change sponsored?: --- Product: Koha Version: 17.05 Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: alexbuckley@catalyst.net.nz Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org This bug report requires the removal of SQL queries out of the admin/env_tz_test.pl script into perl module(s) in the Koha or C4 directory. It also requires POD and unit tests for the new subroutines in the perl module(s). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 61238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61238&action=edit Bug 18299 - Moved the SQL queries from admin/env_tz_test.pl into the C4/Context.pm in two new subroutines. Both new subroutines have a successful subtest in the t/db_dependent/Context.t unit test in addition to POD. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Test Plan: 1. Restart memcached: sudo service memcached restart 2. Drop and recreate the Koha instance database 3. Go through the web installer, selecting all data to be installed in step 3 4. After the web installer is finished log in with the Koha database administrator credentials 5. Create yourself a patron account 6. Set the patron account to have superlibrarian privileges 7. Log out and back in as your newly created patron 8. Navigate to the Administration area 9. Write in the URL: cgi-bin/koha/admin/env_tz_test.pl 10. Notice a page titled with "Dumping ENV". Scroll down and observe the current time printed below the "Checking different TIME elements in the system" title 11. Apply all patches associated with this bug report 12. Repeat steps 1,2,3,4,5,6,7,8,9 13. Again notice the current time is displayed below the "Checking different TIME elements in the system" title 14. In your terminal navigate from your Koha instance root directory to t/db_dependent 15. Enter koha shell: sudo koha-shell <instancename> 16. Run Context.t unit test: prove -v Context.t 17. The tests should run successful 18. Exit the koha shell 19. Navigate back to your Koha instance root directory 20. View admin/env_tz_test.pl script and observe it contains no SQL queries 21. Navigate back to your Koha instance root directory 22. View C4/Context.pm and notice that the get_env_variables and get_current_time subroutines (the subroutines called by env_tz_test.pl to run the SQL queries) contain POD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #3 from Marc Véron <veron@veron.ch> --- Problem with test plan step 16. Run Context.t unit test: prove -v Context.t I get: not ok 41 - Correct time # Failed test 'Correct time' # at t/db_dependent/Context.t line 159. # got: '2017-04-20 11:32:32' # expected: '2017-04-20 09:32:32' # Looks like you failed 1 test of 41. (got: is local time here) Time shown by env_tz_test.pl is local time: Checking different TIME elements in the system: perl localime: Thu Apr 20 11:30:31 2017 system(date): Don Apr 20 11:30:31 CEST 2017 mysql dbh (Context) time_zone : SYSTEM mysql dbh (Context) now() : 2017-04-20 11:30:31 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 62510 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62510&action=edit Bug 18299 - Implemented new locatime function to compare against the value of the output of the get_current_time() function -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #5 from Alex Buckley <alexbuckley@catalyst.net.nz> --- (In response to Marc Veron in comment 3) Hi Marc I have changed the function I use to get the localtime value to compare against the output of the get_current_time in the Context.t test in the patch I just applied. I have run the test and it nows says all tests are successful, so if you test again it should work successfully. Cheers Alex -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61238|0 |1 is obsolete| | --- Comment #6 from Marc Véron <veron@veron.ch> --- Created attachment 62515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62515&action=edit Bug 18299 - Moved the SQL queries from admin/env_tz_test.pl into the C4/Context.pm in two new subroutines. Both new subroutines have a successful subtest in the t/db_dependent/Context.t unit test in addition to POD. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #7 from Marc Véron <veron@veron.ch> --- Created attachment 62516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62516&action=edit Bug 18299 - Implemented new locatime function to compare against the value of the output of the get_current_time() function Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62510|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Marc Véron <veron@veron.ch> 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=18299 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |m.de.rooy@rijksmuseum.nl, | |tomascohen@gmail.com Version|17.05 |unspecified --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I was not aware of this script and I think it does not make sense to have it. I'd prefer to remove it than adding more code to the codebase to maintain it. Opinions? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #8)
I was not aware of this script and I think it does not make sense to have it. I'd prefer to remove it than adding more code to the codebase to maintain it.
Opinions?
No strong opinion. But yes, we could do without this script. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Removal of SQL queries from |Removal of |admin/env_tz_test.pl script |admin/env_tz_test.pl script |into a perl module | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62515|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62516|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #10 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 62996 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62996&action=edit Bug 18299 - Removed unused env_tz_test.pl based on user testing feedback -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=18299 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62996|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 63001 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63001&action=edit [SIGNED OFF] Bug 18299 - Removed unused env_tz_test.pl based on user testing feedback Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=18299 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63001|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 63042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63042&action=edit Bug 18299 - Removed unused env_tz_test.pl based on user testing feedback Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #13 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #8)
I was not aware of this script and I think it does not make sense to have it. I'd prefer to remove it than adding more code to the codebase to maintain it.
Opinions?
I was not aware of this script until recently, but I have been using it to double-check that I've set up the timezone for Koha correctly in Apache. I'm OK with removing the script overall, but could we add timezone information to the About page in the "Server information" tab? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Alex! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to David Cook from comment #13)
(In reply to Jonathan Druart from comment #8)
I was not aware of this script and I think it does not make sense to have it. I'd prefer to remove it than adding more code to the codebase to maintain it.
Opinions?
I was not aware of this script until recently, but I have been using it to double-check that I've set up the timezone for Koha correctly in Apache.
I'm OK with removing the script overall, but could we add timezone information to the About page in the "Server information" tab?
Can you file an enhancement bug for that? I imagine we should be able to make that happen pretty easily. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |RESOLVED --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This won't get ported back to 16.11.x as it is an enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #17 from David Cook <dcook@prosentient.com.au> --- (In reply to Kyle M Hall from comment #15)
(In reply to David Cook from comment #13)
(In reply to Jonathan Druart from comment #8)
I was not aware of this script and I think it does not make sense to have it. I'd prefer to remove it than adding more code to the codebase to maintain it.
Opinions?
I was not aware of this script until recently, but I have been using it to double-check that I've set up the timezone for Koha correctly in Apache.
I'm OK with removing the script overall, but could we add timezone information to the About page in the "Server information" tab?
Can you file an enhancement bug for that? I imagine we should be able to make that happen pretty easily.
Sounds good. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18674 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18299 --- Comment #18 from David Cook <dcook@prosentient.com.au> --- (In reply to Kyle M Hall from comment #15)
(In reply to David Cook from comment #13)
(In reply to Jonathan Druart from comment #8)
I was not aware of this script and I think it does not make sense to have it. I'd prefer to remove it than adding more code to the codebase to maintain it.
Opinions?
I was not aware of this script until recently, but I have been using it to double-check that I've set up the timezone for Koha correctly in Apache.
I'm OK with removing the script overall, but could we add timezone information to the About page in the "Server information" tab?
Can you file an enhancement bug for that? I imagine we should be able to make that happen pretty easily.
I've filed it here: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18674 Although I haven't had time to add a patch myself -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org