[Bug 18231] New: Add the missing id-column to koha.issuingrules-table for DBIC fixtures
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Bug ID: 18231 Summary: Add the missing id-column to koha.issuingrules-table for DBIC fixtures Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Test::DBIx::Class fixtures won't work if the resultset doesn't support last_insert_id. This is only supported with a integer primary key. This patch adds one to issuingrules. -- 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=18231 --- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60921&action=edit Bug 18231 - Add the missing id-column to koha.issuingrules-table for DBIC fixtures Many DBIx-stuffs depend on last_insert_id -- 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=18231 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18226 -- 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=18231 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=18231 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #2 from Marc Véron <veron@veron.ch> --- - Is there any test plan? - The atomic update file is named "Bug-18226-Remove_mock_dbh.sql", but we are on Bug 18231, I think it should be renamed. -- 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=18231 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60921|0 |1 is obsolete| | --- Comment #3 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60955&action=edit Bug 18231 - Add the missing id-column to koha.issuingrules-table for DBIC fixtures Many DBIx-stuffs depend on last_insert_id -- 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=18231 --- Comment #4 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- (In reply to Marc Véron from comment #2)
- Is there any test plan?
t/db_dependent/Reserves.t t/db_dependent/Circulation/CalcFine.t + others. All tests pass, no regression detected.
- The atomic update file is named "Bug-18226-Remove_mock_dbh.sql", but we are on Bug 18231, I think it should be renamed.
Fixed. -- 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=18231 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60955|0 |1 is obsolete| | --- Comment #5 from Marc Véron <veron@veron.ch> --- Created attachment 60964 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60964&action=edit Bug 18231 - Add the missing id-column to koha.issuingrules-table for DBIC fixtures Many DBIx-stuffs depend on last_insert_id Followed test plan from comment #4, works as expected Signed-off-by: Marc Véron <veron@veron.ch> -- 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=18231 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Community thanks you Marc :) -- 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=18231 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Assignee|koha-bugs@lists.koha-commun |olli-antti.kivilahti@jns.fi |ity.org | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Olli: Did you know that we have an Assignee field ? -- 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=18231 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Signed Off |Failed QA --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- unique key is not named the same. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 --- Comment #9 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- (In reply to Jonathan Druart from comment #8)
unique key is not named the same.
Prior to this patch there was no UNIQUE KEY? If you mean the index naming convention doesn't follow a established pattern, maybe it is easiest just let the DB-engine name the index? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 --- Comment #10 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- (In reply to Marcel de Rooy from comment #7)
Olli: Did you know that we have an Assignee field ?
Now I know :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60964|0 |1 is obsolete| | --- Comment #11 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 61102 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61102&action=edit Bug 18231 - Add the missing id-column to koha.issuingrules-table for DBIC fixtures Many DBIx-stuffs depend on last_insert_id Followed test plan from comment #4, works as expected 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=18231 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #12 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- (In reply to Jonathan Druart from comment #8)
unique key is not named the same.
I think you meant the issue where both the PRIMARY KEY and the UNIQUE CONSTRAINT had the same index name? That is now fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 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=18231 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61102|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61218&action=edit Bug 18231 - Add the missing id-column to koha.issuingrules-table for DBIC fixtures Many DBIx-stuffs depend on last_insert_id Followed test plan from comment #4, works as expected 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=18231 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61219 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61219&action=edit Bug 18231: Make sure we will not add the column twice -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Olli, you are not supposed to modify a patch once it has been signed off. Take a look at the second patch to know how to process for DB updates adding/modifying columns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Patch doesn't apply --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Olli! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Kyle M Hall from comment #16)
Pushed to master for 17.05, thanks Olli!
Cancel that! Patch set needs a small rebase! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 --- Comment #18 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 61219 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61219 Bug 18231: Make sure we will not add the column twice Review of attachment 61219: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18231&attachment=61219) ----------------------------------------------------------------- I was just expecting the .perl and removal of the .sql when I went to eyeball this. ::: Koha/Schema/Result/BorrowerAttributeType.pm @@ +154,5 @@
);
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-17 11:43:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0jCQN4xSJYbQC5e7fGn5WQ
Why add this? ::: Koha/Schema/Result/Issue.pm @@ +222,5 @@
);
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-17 11:43:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zGLKwoUmq4pcvY16ei3VPg
Why add this? ::: Koha/Schema/Result/Issuingrule.pm @@ +330,5 @@
);
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-17 11:43:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3K9yYzzg9IYRAuxSXd7CPg
Why add this? ::: Koha/Schema/Result/OldIssue.pm @@ +207,5 @@
);
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-17 11:43:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yTyCAau9EZHBgdqN4Ptljg
Why add this? ::: Koha/Schema/Result/SearchField.pm @@ +48,4 @@
=head2 type
data_type: 'enum' + extra: {list => ["","string","date","number","boolean","sum"]}
Is this from another bug? @@ +65,4 @@
"type", { data_type => "enum", + extra => { list => ["", "string", "date", "number", "boolean", "sum"] },
Is this from another bug? I think it may be valid, but I don't think this bug originally added it. ::: installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.perl @@ +1,3 @@
+$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + unless ( column_exists( 'issuingrules', 'issuingrules_id' ) ) {
This column_exists() has been a fantastic add, since it was put in. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61218|0 |1 is obsolete| | --- Comment #19 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 64966 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64966&action=edit Bug 18231 - Add the missing id-column to koha.issuingrules-table for DBIC fixtures Many DBIx-stuffs depend on last_insert_id Followed test plan from comment #4, works as expected 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=18231 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61219|0 |1 is obsolete| | --- Comment #20 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 64967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64967&action=edit Bug 18231: Make sure we will not add the column twice -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 --- Comment #21 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 64968 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64968&action=edit Bug 18231: (follow-up) Fix t/db_dependent/Koha/Objects.t This Bug broke a test in t/db_dependent/Koha/Objects.t. This patch replaces now failing test with an equal one but targetting a different Koha-object. To test: 1. Apply first & second patch in this Bug and run updatedatabase.pl 2. prove t/db_dependent/Koha/Objects.t 3. Observe following failure: DBIx::Class::ResultSet::find(): find() expects either a column/value hashref, or a list of values corresponding to the columns of the specified unique constraint 'primary' at /home/koha/Koha/Koha/Objects.pm line 227 4. Apply this patch 5. prove t/db_dependent/Koha/Objects.t 6. Observe test passing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lari.taskula@jns.fi --- Comment #22 from Lari Taskula <lari.taskula@jns.fi> --- Noticed a broken test in "t/db_dependent/Koha/Objects.t". Rebased patches on top of current master, removed things pointed out by comment #1 (Please let me know if I shouldn't had done so and I will fix it), switched to "Needs Signoff". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 --- Comment #23 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Lari Taskula from comment #22) > by comment #1 * by comment #18 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19029 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64966|0 |1 is obsolete| | --- Comment #24 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 66969 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66969&action=edit Bug 18231 - Add the missing id-column to koha.issuingrules-table for DBIC fixtures Many DBIx-stuffs depend on last_insert_id Followed test plan from comment #4, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64967|0 |1 is obsolete| | --- Comment #25 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 66970 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66970&action=edit Bug 18231: Make sure we will not add the column twice Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Alex Buckley <alexbuckley@catalyst.net.nz> 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=18231 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64968|0 |1 is obsolete| | --- Comment #26 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 66971 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66971&action=edit Bug 18231: (follow-up) Fix t/db_dependent/Koha/Objects.t This Bug broke a test in t/db_dependent/Koha/Objects.t. This patch replaces now failing test with an equal one but targetting a different Koha-object. To test: 1. Apply first & second patch in this Bug and run updatedatabase.pl 2. prove t/db_dependent/Koha/Objects.t 3. Observe following failure: DBIx::Class::ResultSet::find(): find() expects either a column/value hashref, or a list of values corresponding to the columns of the specified unique constraint 'primary' at /home/koha/Koha/Koha/Objects.pm line 227 4. Apply this patch 5. prove t/db_dependent/Koha/Objects.t 6. Observe test passing Followed test plan, patch worked as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |Failed QA --- Comment #27 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- There is a complaint in the QA tools about a file being added and removed - this is due to the change from .perl to .sql for the file. As all 3 patches have different authors, this can't be fixed by squashing (not a blocker in my opinion). FAIL installer/data/mysql/atomicupdate/Bug-18231-id_to_ussingrules_table.sql FAIL git manipulation The file has been added and deleted in the same patchset t/db_dependent/Koha/IssuingRules.t are ok. BUT: Cloning isusing rules from one of the library (default to Union for example) fails: -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18231 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|Failed QA |RESOLVED --- Comment #28 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- issuingrules is gone - so this turns into "INVALID". -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org