[Bug 19277] New: TT syntax - Data is not ordered in notices
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Bug ID: 19277 Summary: TT syntax - Data is not ordered in notices Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org This issue has been highlighted by a failing test: ISSUESLIP displays checkouts in random order I thought it was because of dates comparison, but it comes from the following line in C4::Letters::_get_tt_params my $objects = $module->search( { $key => { -in => $values } } ); The DBMS will return data like there is ordered in the DB. For instance: select borrowernumber from borrowers where borrowernumber in (5, 3, 1); or select borrowernumber from borrowers where borrowernumber=5 or borrowernumber=3 or borrowernumber=1; will return 1, 3, 5 -- 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=19277 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Depends on| |17966 Status|NEW |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17966 [Bug 17966] TT syntax for notices - Prove that ISSUESLIP is compatible -- 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=19277 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66985&action=edit Bug 19277: TT syntax - Display ordered data This issue has been highlighted by a failing test: ISSUESLIP displays checkouts in random order I thought it was because of dates comparison, but it comes from the following line in C4::Letters::_get_tt_params my $objects = $module->search( { $key => { -in => $values } } ); The DBMS will return data like there is ordered in the DB. For instance: select borrowernumber from borrowers where borrowernumber in (5, 3, 1); or select borrowernumber from borrowers where borrowernumber=5 or borrowernumber=3 or borrowernumber=1; will return 1, 3, 5 I did not find a generic way to do that, so used "ORDER BY FIELD" which will not be portable. Test plan: If you do not apply this patch, the tests will sometime fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66986 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66986&action=edit Bug 19277: Make sure the tests will pass even if they are slow This patch was my first attempt to fix the issue. I think it is good to have it, if issue.timestamp and issue.issuedate are the same, the result will be orderd by issue_id. The tests highlight the fact that checkouts must be displayed in the correct order. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Lee Jamison <ldjamison@marywood.edu> 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=19277 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66985|0 |1 is obsolete| | --- Comment #3 from Lee Jamison <ldjamison@marywood.edu> --- Created attachment 67000 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67000&action=edit Bug 19277: TT syntax - Display ordered data This issue has been highlighted by a failing test: ISSUESLIP displays checkouts in random order I thought it was because of dates comparison, but it comes from the following line in C4::Letters::_get_tt_params my $objects = $module->search( { $key => { -in => $values } } ); The DBMS will return data like there is ordered in the DB. For instance: select borrowernumber from borrowers where borrowernumber in (5, 3, 1); or select borrowernumber from borrowers where borrowernumber=5 or borrowernumber=3 or borrowernumber=1; will return 1, 3, 5 I did not find a generic way to do that, so used "ORDER BY FIELD" which will not be portable. Test plan: If you do not apply this patch, the tests will sometime fail Signed-off-by: Lee Jamison <ldjamison@marywood.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66986|0 |1 is obsolete| | --- Comment #4 from Lee Jamison <ldjamison@marywood.edu> --- Created attachment 67001 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67001&action=edit Bug 19277: Make sure the tests will pass even if they are slow This patch was my first attempt to fix the issue. I think it is good to have it, if issue.timestamp and issue.issuedate are the same, the result will be orderd by issue_id. The tests highlight the fact that checkouts must be displayed in the correct order. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67000|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 67043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67043&action=edit Bug 19277: TT syntax - Display ordered data This issue has been highlighted by a failing test: ISSUESLIP displays checkouts in random order I thought it was because of dates comparison, but it comes from the following line in C4::Letters::_get_tt_params my $objects = $module->search( { $key => { -in => $values } } ); The DBMS will return data like there is ordered in the DB. For instance: select borrowernumber from borrowers where borrowernumber in (5, 3, 1); or select borrowernumber from borrowers where borrowernumber=5 or borrowernumber=3 or borrowernumber=1; will return 1, 3, 5 I did not find a generic way to do that, so used "ORDER BY FIELD" which will not be portable. Test plan: If you do not apply this patch, the tests will sometime fail Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67001|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 67044 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67044&action=edit Bug 19277: Make sure the tests will pass even if they are slow This patch was my first attempt to fix the issue. I think it is good to have it, if issue.timestamp and issue.issuedate are the same, the result will be orderd by issue_id. The tests highlight the fact that checkouts must be displayed in the correct order. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Bug 19277 depends on bug 17966, which changed state. Bug 17966 Summary: TT syntax for notices - Prove that ISSUESLIP is compatible https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17966 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19277 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 17966 not in 17.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org