[Bug 12627] New: SQLHelper replacement - C4::Suggestions
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Bug ID: 12627 Summary: SQLHelper replacement - C4::Suggestions Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: yohann.dufour@biblibre.com QA Contact: testopia@bugs.koha-community.org The module C4::Suggestions depends on module C4::SQLHelper. However, the module SQLHelper is obsolete, so the calls in NewSuggestion and UpdateSuggestion have to be replaced by the use of the module DBIx::Class. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |yohann.dufour@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12445 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #1 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 29963 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29963&action=edit Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion uses DBIx::Class instead of C4::SQLHelper. Moreover, the tests has been adapted to the values returned by DBIx::Class. Test plan: 1) Apply the patch 12445 in order to get the last unit tests for Suggestions 2) Apply the patch 3) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 4) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11385 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29963|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 30095 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30095&action=edit [SIGNED-OFF] Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion uses DBIx::Class instead of C4::SQLHelper. Moreover, the tests has been adapted to the values returned by DBIx::Class. Test plan: 1) Apply the patch 12445 in order to get the last unit tests for Suggestions 2) Apply the patch 3) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 4) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS 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=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30095|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30237 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30237&action=edit [PASSED QA] Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion uses DBIx::Class instead of C4::SQLHelper. Moreover, the tests has been adapted to the values returned by DBIx::Class. Test plan: 1) Apply the patch 12445 in order to get the last unit tests for Suggestions 2) Apply the patch 3) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 4) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tests pass, no problems found. Patch applies on top of bug 12445. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but running the tests proved to be not enough. This patch breaks adding a suggestion from the staff interface (didn't test OPAC). DBIx::Class::Row::new(): No such column 'EUR' on Koha::Schema::Result::Suggestion at /home/katrin/kohaclone/C4/Suggestions.pm line 435 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #5 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 30269 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30269&action=edit Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion use DBIx::Class instead of C4::SQLHelper. Moreover, the tests and the .pl have been adapted. Test plan: 1) Apply the patch 12445 in order to get the last unit tests for Suggestions. 2) Apply the patch. 3) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 4) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS 5) Log in the intranet, create a suggestion and verify the created suggestion. 6) Edit a suggestion from the intranet and verify the suggestion is correctly modified. 7) Log in the OPAC and verify you can add a suggestion. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30237|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=12627 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Yohann, now on staff I can create a suggestion, but on opac I got DBIx::Class::ResultSet::create(): No such column negcap on Koha::Schema::Result::Suggestion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30269|0 |1 is obsolete| | --- Comment #7 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 30624 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30624&action=edit Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion use DBIx::Class instead of C4::SQLHelper. Moreover, the tests and the .pl have been adapted. Test plan: 1) Apply the patch. 2) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 3) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS 4) Log in the intranet, create a suggestion and verify the created suggestion. 5) Edit a suggestion from the intranet and verify the suggestion is correctly modified. 6) Log in the OPAC and verify you can add a suggestion. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30624|0 |1 is obsolete| | --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 30635 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30635&action=edit [SIGNED-OFF] Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion use DBIx::Class instead of C4::SQLHelper. Moreover, the tests and the .pl have been adapted. Test plan: 1) Apply the patch. 2) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 3) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS 4) Log in the intranet, create a suggestion and verify the created suggestion. 5) Edit a suggestion from the intranet and verify the suggestion is correctly modified. 6) Log in the OPAC and verify you can add a suggestion. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Test pass, suggestion created on staff and opac, suggestion edited without problems, no koha-qa errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30635|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30892 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30892&action=edit [PASSED QA] Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion use DBIx::Class instead of C4::SQLHelper. Moreover, the tests and the .pl have been adapted. Test plan: 1) Apply the patch. 2) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 3) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS 4) Log in the intranet, create a suggestion and verify the created suggestion. 5) Edit a suggestion from the intranet and verify the suggestion is correctly modified. 6) Log in the OPAC and verify you can add a suggestion. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Test pass, suggestion created on staff and opac, suggestion edited without problems, no koha-qa errors. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and QA script: Also tested: - adding suggestion from staff and OPAC - edit suggestion from staff - deleting suggestion from OPAC - changing to a normal status (email got created) - changing to a custom status (SUGGEST_STATUS) - display of custom status in OPAC No problems found. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Tests don't pass, presumably related to bug 12781 patches. Once I changed status for STATUS in several places, more tests pass [1], but it is still failing. [1] diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index ddfa1b6..9461fb2 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -428,7 +428,7 @@ sub NewSuggestion { my $new_suggestion = { %$suggestion }; $suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS}; - $new_suggestion->{status} = $suggestion->{STATUS}; + $new_suggestion->{STATUS} = $suggestion->{STATUS}; delete $new_suggestion->{STATUS}; my $rs = Koha::Database->new->schema->resultset('Suggestion'); @@ -455,7 +455,7 @@ sub ModSuggestion { my $mod_suggestion = { %$suggestion }; my $status = $suggestion->{STATUS}; delete $mod_suggestion->{STATUS}; - $mod_suggestion->{status} = $status; + $mod_suggestion->{STATUS} = $status; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31916 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31916&action=edit Bug 12627: DBIx::Class is case sensitive for column names STATUS should be "STATUS", not "status". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31917 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31917&action=edit Bug 12627: Remove warnings suggestion.pl: keys on reference is experimental -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13005 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31937 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31937&action=edit Bug 12627: Fix date management C4::Dates->today returns a string formatted depending on the dateformat syspref. Before the original patch, SQLHelper managed both format (string formatted and DateTime. Now DBIX::Class only manages DateTime, so the call to NewSuggestion and ModSuggestion should pass a DateTime object -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31939 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31939&action=edit Bug 12627: Fix default values The default value for *by and *date fields is NULL. But without this patch, the values are 0 or 0000-00-00. It comes from the fact that the form set to an empty string the values and DBIX::Class does not consider them as undefined. This patch is very ugly, not sure how we can fix that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31939|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31940 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31940&action=edit Bug 12627: Fix default values The default value for *by and *date fields is NULL. But without this patch, the values are 0 or 0000-00-00. It comes from the fact that the form set to an empty string the values and DBIX::Class does not consider them as undefined. This patch is very ugly, not sure how we can fix that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31940|0 |1 is obsolete| | --- Comment #16 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31941 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31941&action=edit Bug 12627: Fix default values The default value for *by and *date fields is NULL. But without this patch, the values are 0 or 0000-00-00. It comes from the fact that the form set to an empty string the values and DBIX::Class does not consider them as undefined. This patch is very ugly, not sure how we can fix that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #17 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31942 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31942&action=edit Bug 12627: Bug 12627: Fix default values - TT changes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off CC| |jonathan.druart@biblibre.co | |m Assignee|yohann.dufour@biblibre.com |jonathan.druart@biblibre.co | |m --- Comment #18 from Jonathan Druart <jonathan.druart@biblibre.com> --- Last 5 patches need to be QAed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31941|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31944 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31944&action=edit Bug 12627: Fix default values The default value for *by and *date fields is NULL. But without this patch, the values are 0 or 0000-00-00. It comes from the fact that the form set to an empty string the values and DBIX::Class does not consider them as undefined. This patch is very ugly, not sure how we can fix that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13007 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31942|0 |1 is obsolete| | --- Comment #20 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31948 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31948&action=edit Bug 12627: Bug 12627: Fix default values - TT changes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31944|0 |1 is obsolete| | --- Comment #21 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31953 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31953&action=edit Bug 12627: Fix default values The default value for *by and *date fields is NULL. But without this patch, the values are 0 or 0000-00-00. It comes from the fact that the form set to an empty string the values and DBIX::Class does not consider them as undefined. This patch is very ugly, not sure how we can fix that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sadly, I found a bug: 1) create a new suggestion from OPAC (filled out Title and item type) 2) switch to staff and edit it (changed publication year) 3) save: A DateTime object can only be compared to another DateTime object (DateTime=HASH(0x793ac50), 0). at /home/katrin/kohaclone/C4/Suggestions.pm line 479. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31953|0 |1 is obsolete| | --- Comment #23 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 33244 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33244&action=edit Bug 12627: Fix default values The default value for *by and *date fields is NULL. But without this patch, the values are 0 or 0000-00-00. It comes from the fact that the form set to an empty string the values and DBIX::Class does not consider them as undefined. This patch is very ugly, not sure how we can fix that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #24 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #22)
Sadly, I found a bug:
Fortunately, you found it! :) It should be fixed now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31937|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=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31948|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=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31916|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=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31917|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=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30892|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=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33244|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=12627 --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33276 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33276&action=edit [PASSED QA] Bug 12627: SQLHelper replacement - C4::Suggestions With this patch, the subroutines NewSuggestion and ModSuggestion use DBIx::Class instead of C4::SQLHelper. Moreover, the tests and the .pl have been adapted. Test plan: 1) Apply the patch. 2) Execute the unit tests by launching : prove t/db_dependent/Suggestions.t 3) The result has to be a success without error or warning : t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=91, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.65 cusr 0.09 csys = 1.80 CPU) Result: PASS 4) Log in the intranet, create a suggestion and verify the created suggestion. 5) Edit a suggestion from the intranet and verify the suggestion is correctly modified. 6) Log in the OPAC and verify you can add a suggestion. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Test pass, suggestion created on staff and opac, suggestion edited without problems, no koha-qa errors. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and QA script: Also tested: - adding suggestion from staff and OPAC - edit suggestion from staff - deleting suggestion from OPAC - changing to a normal status (email got created) - changing to a custom status (SUGGEST_STATUS) - display of custom status in OPAC No problems found. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33277 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33277&action=edit [PASSED QA] Bug 12627: DBIx::Class is case sensitive for column names STATUS should be "STATUS", not "status". Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #27 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33278 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33278&action=edit [PASSED QA] Bug 12627: Remove warnings suggestion.pl: keys on reference is experimental Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #28 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33279 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33279&action=edit [PASSED QA] Bug 12627: Fix date management C4::Dates->today returns a string formatted depending on the dateformat syspref. Before the original patch, SQLHelper managed both format (string formatted and DateTime. Now DBIX::Class only manages DateTime, so the call to NewSuggestion and ModSuggestion should pass a DateTime object Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #29 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33280 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33280&action=edit [PASSED QA] Bug 12627: Bug 12627: Fix default values - TT changes Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 --- Comment #30 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 33281 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33281&action=edit [PASSED QA] Bug 12627: Fix default values The default value for *by and *date fields is NULL. But without this patch, the values are 0 or 0000-00-00. It comes from the fact that the form set to an empty string the values and DBIX::Class does not consider them as undefined. This patch is very ugly, not sure how we can fix that. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> No regressions found, adding and editing suggestions from OPAC and staff. Passes tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #31 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Yohann and Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #32 from David Cook <dcook@prosentient.com.au> --- Could someone double-check adding a new suggestion via the OPAC? My git is pretty messy at the moment, and I'm balancing a few different things at once, so I might have to check later. However, when I try to add a suggestion via the OPAC in master, I get this error: DBIx::Class::Row::new(): No such column 'branch' on Koha::Schema::Result::Suggestion at /koha/dev/dcook/git/C4/Suggestions.pm line 449 When I look up on the script, I notice this: my $suggestion = $input->Vars; Which is rather nasty... and I notice this: delete $$suggestion{$_} foreach qw<op suggestedbyme>; Which is also rather nasty... -- In any case, the form from opac-suggestions.pl passes branchcode as "branch", but DBIC expects to receive "branchcode". So... I guess the easy fix is to probably change the template. (But we should probably be explicitly building the $suggestion hash rather than relying on $input->Vars, as all sorts of badness could be passed in there which will cause the script to croak) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13329 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13731 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_candidate CC| |mtj@kohaaloha.com --- Comment #33 from Mason James <mtj@kohaaloha.com> --- Possible selection for 3.16.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |In Discussion --- Comment #34 from Mason James <mtj@kohaaloha.com> --- (In reply to David Cook from comment #32)
Could someone double-check adding a new suggestion via the OPAC?
However, when I try to add a suggestion via the OPAC in master, I get this error:
DBIx::Class::Row::new(): No such column 'branch' on Koha::Schema::Result::Suggestion at /koha/dev/dcook/git/C4/Suggestions.pm line 449
hmm, i might switch this bug to 'discussion' -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|In Discussion |RESOLVED --- Comment #35 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Mason, I am switching this back - I believe "In Discussion" is the wrong status here, as this has already been pushed and resolved. The problem described by dcook in comment#32 has been fixed by bug 13329. But anyway, I don't think tidy up patches like this are needed in the stable releases - ideally they don't change anything for the end user and will have more testing before reaching stable this way. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12627 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_3_16_candidate | --- Comment #36 from Mason James <mtj@kohaaloha.com> --- (In reply to Katrin Fischer from comment #35)
Hi Mason,
I am switching this back - I believe "In Discussion" is the wrong status here, as this has already been pushed and resolved. The problem described by dcook in comment#32 has been fixed by bug 13329.
aah, bug 13329... good spotting!
But anyway, I don't think tidy up patches like this are needed in the stable releases - ideally they don't change anything for the end user and will have more testing before reaching stable this way.
yes, i agree.. i'll pass on pulling this patch for 3.16.x, thanks :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org