Bugzilla – Attachment 194107 Details for
Bug 41950
Make +count embeds sortable by using SQL-level COUNT subqueries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41950: Unit tests for sortable +count embeds
6cc2c6e.patch (text/plain), 1.37 KB, created by
Tomás Cohen Arazi (tcohen)
on 2026-02-27 16:51:37 UTC
(
hide
)
Description:
Bug 41950: Unit tests for sortable +count embeds
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2026-02-27 16:51:37 UTC
Size:
1.37 KB
patch
obsolete
>From 6cc2c6e85f0032a37646942a5b5ee8517ee303d1 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@theke.io> >Date: Fri, 27 Feb 2026 12:31:20 -0300 >Subject: [PATCH] Bug 41950: Unit tests for sortable +count embeds >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Add tests to verify that +count embeds produce +select/+as attributes >instead of a prefetch, enabling SQL-level sorting by count columns. > >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> >--- > t/Koha/REST/Plugin/Query.t | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/t/Koha/REST/Plugin/Query.t b/t/Koha/REST/Plugin/Query.t >index e465ecca93..eb278a00d5 100755 >--- a/t/Koha/REST/Plugin/Query.t >+++ b/t/Koha/REST/Plugin/Query.t >@@ -466,7 +466,7 @@ subtest 'dbic_merge_sorting() tests' => sub { > }; > > subtest '/dbic_merge_prefetch' => sub { >- plan tests => 10; >+ plan tests => 11; > > my $t = Test::Mojo->new; > >@@ -485,7 +485,10 @@ subtest '/dbic_merge_prefetch' => sub { > } > ); > >- $t->get_ok('/dbic_merge_prefetch_count')->status_is(200)->json_is( '/prefetch/0' => 'guarantee' ); >+ $t->get_ok('/dbic_merge_prefetch_count') >+ ->status_is(200) >+ ->json_is( '/+as/0' => 'guarantee_count' ) >+ ->json_hasnt('/prefetch'); > }; > > subtest '/merge_q_params' => sub { >-- >2.50.1 (Apple Git-155) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41950
:
194107
|
194108
|
194191
|
194192