[Bug 13244] New: GetCancelledOrders and GetOrders can be merged
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Bug ID: 13244 Summary: GetCancelledOrders and GetOrders can be merged Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org They do the same job. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 33517 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33517&action=edit Bug 13244: Merge GetOrders and GetCancelledOrders These two subroutines did the same job (same select, same join, etc.) Test plan: Go on the basket list page and verify you see the pending and the cancelled baskets. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33517|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 33518 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33518&action=edit Bug 13244: Merge GetOrders and GetCancelledOrders These two subroutines did the same job (same select, same join, etc.) Test plan: Go on the basket list page and verify you see the pending and the cancelled baskets. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Not sure it's consistent. The query are not really readable... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- s/are/is! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33518|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 33519 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33519&action=edit Bug 13244: Merge GetOrders and GetCancelledOrders These two subroutines did the same job (same select, same join, etc.) Test plan: Go on the basket list page and verify you see the pending and the cancelled baskets. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Needs Signoff |Failed QA --- Comment #6 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Running the test (adjust tests to 87): not ok 14 - GetOrder gets an order with the right number of fields # Failed test 'GetOrder gets an order with the right number of fields' # at t/db_dependent/Acquisition.t line 392. # got: '60' # expected: '59' not ok 16 - GetOrder gets an order with no unexpected fields # Failed test 'GetOrder gets an order with no unexpected fields' # at t/db_dependent/Acquisition.t line 399. # got: 'cancelledby' # expected: '' etc. # Looks like you failed 8 tests of 87. Please verify if you have the same .. Parking in FQA now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to M. de Rooy from comment #6)
Running the test (adjust tests to 87):
not ok 14 - GetOrder gets an order with the right number of fields # Failed test 'GetOrder gets an order with the right number of fields' # at t/db_dependent/Acquisition.t line 392. # got: '60' # expected: '59'
not ok 16 - GetOrder gets an order with no unexpected fields # Failed test 'GetOrder gets an order with no unexpected fields' # at t/db_dependent/Acquisition.t line 399. # got: 'cancelledby' # expected: ''
etc.
# Looks like you failed 8 tests of 87.
Please verify if you have the same .. Parking in FQA now.
Does they pass on master? Maybe you have an extra DB field in your aqorders table (check the var $test_extra_fields l.392). The tests pass here. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #7)
(In reply to M. de Rooy from comment #6)
Running the test (adjust tests to 87):
not ok 14 - GetOrder gets an order with the right number of fields # Failed test 'GetOrder gets an order with the right number of fields' # at t/db_dependent/Acquisition.t line 392. # got: '60' # expected: '59'
not ok 16 - GetOrder gets an order with no unexpected fields # Failed test 'GetOrder gets an order with no unexpected fields' # at t/db_dependent/Acquisition.t line 399. # got: 'cancelledby' # expected: ''
etc.
# Looks like you failed 8 tests of 87.
Please verify if you have the same .. Parking in FQA now.
Does they pass on master? Maybe you have an extra DB field in your aqorders table (check the var $test_extra_fields l.392). The tests pass here.
Sorry, it does not pass on master too. Will have a look what fields were added when testing something else :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 35582 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35582&action=edit Bug 13244: Follow-up for unneeded redeclaration Resolves: FAIL acqui/basket.pl OK critic OK forbidden patterns OK pod FAIL valid "my" variable @results masks earlier declaration in same scope Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- OK. The test passes now. Overall, it looks good. One small question: This does not look good? $query .= $cancelled ? q| aqorders_transfers.ordernumber_from AS transferred_to, aqorders_transfers.timestamp AS transferred_to_timestamp | : q| aqorders_transfers.ordernumber_from AS transferred_from, aqorders_transfers.timestamp AS transferred_from_timestamp |; Did you mixup to and from in the first line? Please compare with the lines you removed: - aqorders_transfers.ordernumber_to AS transferred_to, - aqorders_transfers.timestamp AS transferred_to_timestamp Parking in FQA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35583 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35583&action=edit Bug 13244: (follow-up) fix mixup to and from in the sql query -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to M. de Rooy from comment #10)
OK. The test passes now. Overall, it looks good. One small question: This does not look good?
$query .= $cancelled ? q| aqorders_transfers.ordernumber_from AS transferred_to, aqorders_transfers.timestamp AS transferred_to_timestamp | : q| aqorders_transfers.ordernumber_from AS transferred_from, aqorders_transfers.timestamp AS transferred_from_timestamp |;
Did you mixup to and from in the first line?
Erk, yes I did! Thanks for catching that Marcel. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #33519|0 |1 is obsolete| | Attachment #35582|0 |1 is obsolete| | Attachment #35583|0 |1 is obsolete| | --- Comment #13 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 35584 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35584&action=edit Bug 13244: Merge GetOrders and GetCancelledOrders These two subroutines did the same job (same select, same join, etc.) Test plan: Go on the basket list page and verify you see the pending and the cancelled baskets. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Two small things are adjusted in separate follow-ups. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #14 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 35585 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35585&action=edit Bug 13244: Follow-up for unneeded redeclaration Resolves: FAIL acqui/basket.pl OK critic OK forbidden patterns OK pod FAIL valid "my" variable @results masks earlier declaration in same scope Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 --- Comment #15 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 35586 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35586&action=edit Bug 13244: (follow-up) fix mixup to and from in the sql query Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=13244 Kyle M Hall <kyle@bywatersolutions.com> 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=13244 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35584|0 |1 is obsolete| | Attachment #35585|0 |1 is obsolete| | Attachment #35586|0 |1 is obsolete| | --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 35624 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35624&action=edit [PASSED QA] Bug 13244: Merge GetOrders and GetCancelledOrders These two subroutines did the same job (same select, same join, etc.) Test plan: Go on the basket list page and verify you see the pending and the cancelled baskets. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Two small things are adjusted in separate follow-ups. 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=13244 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 35625 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35625&action=edit [PASSED QA] Bug 13244: Follow-up for unneeded redeclaration Resolves: FAIL acqui/basket.pl OK critic OK forbidden patterns OK pod FAIL valid "my" variable @results masks earlier declaration in same scope Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=13244 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 35626 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35626&action=edit [PASSED QA] Bug 13244: (follow-up) fix mixup to and from in the sql query Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=13244 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply CC| |tomascohen@gmail.com --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Unfortunately this one is not cleanly applying after I pushed 12976 and 12970. Please rebase. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35624|0 |1 is obsolete| | Attachment #35625|0 |1 is obsolete| | Attachment #35626|0 |1 is obsolete| | --- Comment #20 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 36034 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36034&action=edit Bug 13244: Merge GetOrders and GetCancelledOrders These two subroutines did the same job (same select, same join, etc.) Test plan: Go on the basket list page and verify you see the pending and the cancelled baskets. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Two small things are adjusted in separate follow-ups. 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=13244 --- Comment #21 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 36035 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36035&action=edit Bug 13244: (follow-up) fix mixup to and from in the sql query Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=13244 --- Comment #22 from Jonathan Druart <jonathan.druart@biblibre.com> --- Rebased, second patch skipped (not used anymore). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13244 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org