[Bps-public-commit] RT-Extension-MergeUsers branch master updated. 1.06-5-g7b46802

BPS Git Server git at git.bestpractical.com
Thu Apr 13 20:52:45 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "RT-Extension-MergeUsers".

The branch, master has been updated
       via  7b468024436630187e7b8f2f494095a5cb786400 (commit)
       via  c3e6261dd64ee9390f1261edef57910d29ba428f (commit)
       via  33ad10e36787b2ec46924c51414c3b6882549b30 (commit)
       via  02b2c795d5cb99439971071c7178e43894677b4e (commit)
      from  ccb8e956304ee59a07ed61e747c8e3019cf8b49d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7b468024436630187e7b8f2f494095a5cb786400
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Apr 14 04:47:42 2023 +0800

    Prep 1.07

diff --git a/Changes b/Changes
index b117e9b..37ed7db 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for RT-Extension-MergeUsers
 
+1.07 2023-04-13
+ - Support the new CombineSearchAndCount feature in DBIx::SearchBuilder
+   (Fix the issue that the first page of user search results might be empty)
+
 1.06 2020-07-17
  - Add RT 5 support
 
diff --git a/META.yml b/META.yml
index f84f30d..b195239 100644
--- a/META.yml
+++ b/META.yml
@@ -28,6 +28,6 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-mergeusers
-version: '1.06'
+version: '1.07'
 x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.0.0
diff --git a/README b/README
index 31625be..c1cc64b 100644
--- a/README
+++ b/README
@@ -97,7 +97,7 @@ BUGS
         L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-MergeUsers>.
 
 LICENSE AND COPYRIGHT
-    This software is Copyright (c) 2014-2020 by Best Practical Solutions
+    This software is Copyright (c) 2014-2023 by Best Practical Solutions
 
     This is free software, licensed under:
 
diff --git a/lib/RT/Extension/MergeUsers.pm b/lib/RT/Extension/MergeUsers.pm
index 89b4ef4..2b2f8b3 100644
--- a/lib/RT/Extension/MergeUsers.pm
+++ b/lib/RT/Extension/MergeUsers.pm
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2020 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2023 Best Practical Solutions, LLC
 #                                          <sales at bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -55,7 +55,7 @@ use RT::Shredder;
 
 package RT::Extension::MergeUsers;
 
-our $VERSION = '1.06';
+our $VERSION = '1.07';
 
 =head1 NAME
 
@@ -705,7 +705,7 @@ or via the web at
 
 =head1 LICENSE AND COPYRIGHT
 
-This software is Copyright (c) 2014-2020 by Best Practical Solutions
+This software is Copyright (c) 2014-2023 by Best Practical Solutions
 
 This is free software, licensed under:
 

commit c3e6261dd64ee9390f1261edef57910d29ba428f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Apr 14 04:46:45 2023 +0800

    Update M:I:RTx

diff --git a/META.yml b/META.yml
index 919c158..f84f30d 100644
--- a/META.yml
+++ b/META.yml
@@ -29,5 +29,5 @@ resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-mergeusers
 version: '1.06'
-x_module_install_rtx_version: '0.42'
+x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.0.0
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 2dd9489..2889ece 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -9,7 +9,7 @@ no warnings 'once';
 use Term::ANSIColor qw(:constants);
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.42';
+our $VERSION = '0.43';
 
 use FindBin;
 use File::Glob     ();
@@ -134,7 +134,7 @@ lexicons ::
     if( $extra_args->{'remove_files'} ){
         $self->include('Module::Install::RTx::Remove');
         our @remove_files;
-        eval { require "etc/upgrade/remove_files" }
+        eval { require "./etc/upgrade/remove_files" }
           or print "No remove file located, no files to remove\n";
         $remove_files = join ",", map {"q(\$(DESTDIR)$plugin_path/$name/$_)"} @remove_files;
     }

commit 33ad10e36787b2ec46924c51414c3b6882549b30
Merge: ccb8e95 02b2c79
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Apr 14 04:43:38 2023 +0800

    Merge branch 'fix-user-search-pagination'


commit 02b2c795d5cb99439971071c7178e43894677b4e
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Apr 13 16:51:26 2023 -0300

    Support the CombineSearchAndCount feature in DBIx::SearchBuilder
    
    When CombineSearchAndCount is enabled, _DoSearchAndCount will be called
    instead of _DoSearch. As both methods call __DoSearch underneath, we can
    clear seen_users there instead.

diff --git a/lib/RT/Extension/MergeUsers.pm b/lib/RT/Extension/MergeUsers.pm
index 848214d..89b4ef4 100644
--- a/lib/RT/Extension/MergeUsers.pm
+++ b/lib/RT/Extension/MergeUsers.pm
@@ -429,10 +429,26 @@ sub AddRecord {
     return $self->SUPER::AddRecord($record);
 }
 
-sub _DoSearch {
-    my $self = shift;
-    delete $self->{seen_users};
-    return $self->SUPER::_DoSearch(@_);
+# DBIx::SearchBuilder 1.72 adds a new feature called CombineSearchAndCount,
+# when it's enabled _DoSearchAndCount will be called instead of _DoSearch. As
+# both methods call __DoSearch underneath, we can clear seen_users there
+# instead. In older versions, _we have only _DoSearch, so we need to clear
+# seen_users there for compatibility purposes.
+
+if ( DBIx::SearchBuilder->can('__DoSearch') ) {
+    no warnings 'redefine';
+    *__DoSearch = sub {
+        my $self = shift;
+        delete $self->{seen_users};
+        return $self->SUPER::__DoSearch(@_);
+    };
+} else {
+    no warnings 'redefine';
+    *_DoSearch = sub {
+        my $self = shift;
+        delete $self->{seen_users};
+        return $self->SUPER::_DoSearch(@_);
+    };
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 Changes                        |  4 ++++
 META.yml                       |  4 ++--
 README                         |  2 +-
 inc/Module/Install/RTx.pm      |  4 ++--
 lib/RT/Extension/MergeUsers.pm | 30 +++++++++++++++++++++++-------
 5 files changed, 32 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
RT-Extension-MergeUsers


More information about the Bps-public-commit mailing list