[Bps-public-commit] RT-Extension-MergeUsers branch, update-for-rt5, created. 1.05-6-g9e0a944

Craig Kaiser craig at bestpractical.com
Fri Jul 17 10:54:01 EDT 2020


The branch, update-for-rt5 has been created
        at  9e0a944e791eb1e03364930841d6d851cd2e10f0 (commit)

- Log -----------------------------------------------------------------
commit fc0f5fa1397b0d7761c5ec8be7b5dc4ebb0aca60
Author: craig kaiser <craig at bestpractical.com>
Date:   Fri Jul 17 10:43:21 2020 -0400

    Add Bootstrap styles for RT5 installs

diff --git a/html/Callbacks/RT-Extension-MergeUsers/Admin/Users/Modify.html/RightColumnBottom b/html/Callbacks/RT-Extension-MergeUsers/Admin/Users/Modify.html/RightColumnBottom
index 2b6e29f..747509a 100644
--- a/html/Callbacks/RT-Extension-MergeUsers/Admin/Users/Modify.html/RightColumnBottom
+++ b/html/Callbacks/RT-Extension-MergeUsers/Admin/Users/Modify.html/RightColumnBottom
@@ -47,6 +47,55 @@
 %# END BPS TAGGED BLOCK }}}
 <br />
 <&| /Widgets/TitleBox, title => loc('Merge user') &>
+% if ( RT::Handle::cmp_version($RT::VERSION, '5.0.0') >= 0 ) {
+  <div class="form-row">
+  <p class="error"><% $result||'' %></p>
+</div>
+
+% my ($EffectiveId) = $UserObj->Attributes->Named("EffectiveId");
+% my @MergedUsers = @{$UserObj->GetMergedUsers->Content};
+% if ($EffectiveId) {
+<div class="form-row">
+  <div class="col-auto label">
+    This user has been merged with <a href="Modify.html?id=<% $EffectiveId->Content %>">
+% my $real = RT::User->new($session{'CurrentUser'});
+% $real->Load($EffectiveId->Content);
+<% $real->NameAndEmail %></a>
+  </div>
+  <div class="col-auto">
+    <input class="form-control" type="submit" name="Unmerge" value="Unmerge" />
+  </div>
+</div>
+% } elsif (@MergedUsers) {
+  <div class="form-row">
+    <div class="label text-left">
+      The following users have been merged into this user:
+    </div>
+  </div>
+%   foreach my $user_id (@MergedUsers) {
+%       my $user = RT::User->new($session{'CurrentUser'});
+%       $user->LoadOriginal(Id => $user_id);
+<div class="form-row">
+  <div class="col-4 text-left">
+    <% $user->NameAndEmail %>
+  </div>
+  <div class="col-4 value">
+    <input class="form-control" type="submit" name="Unmerge<%$user_id%>" value="Unmerge">
+  </div>
+</div>
+%   }
+% } else {
+<div class="form-row">
+  <div class="label col-auto text-left">
+    Merge this user into:
+  </div>
+  <div class="value col-auto">
+    <input class="form-control" name="MergeUser" data-autocomplete="Users" data-autocomplete-return="Name" value="" />
+  </div>
+</div>
+% }
+% }
+% else {
 <p class="error"><% $result||'' %></p>
 % my ($EffectiveId) = $UserObj->Attributes->Named("EffectiveId");
 % my @MergedUsers = @{$UserObj->GetMergedUsers->Content};
@@ -65,6 +114,7 @@ The following users have been merged into this user:<br>
 % } else {
 Merge this user into: <input name="MergeUser" data-autocomplete="Users" data-autocomplete-return="Name" value="" />
 % }
+% }
 </&>
 <%init>
 return unless $UserObj->id;

commit 09b034b0c4f9a215a817e096f079c8a4df1e4118
Author: craig kaiser <craig at bestpractical.com>
Date:   Thu Jul 9 16:46:06 2020 -0400

    Update bin/ scripts from rt4 to rt5 as default lib location

diff --git a/bin/rt-clean-merged-users.in b/bin/rt-clean-merged-users.in
index 40367da..dd427a2 100755
--- a/bin/rt-clean-merged-users.in
+++ b/bin/rt-clean-merged-users.in
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 
 ### after: use lib qw(@RT_LIB_PATH@);
-use lib qw(/opt/rt4/local/lib /opt/rt4/lib);
+use lib qw(/opt/rt5/local/lib /opt/rt5/lib);
 use RT;
 RT::LoadConfig();
 RT::Init();
diff --git a/bin/rt-merge-users.in b/bin/rt-merge-users.in
index ffe82b4..131f535 100755
--- a/bin/rt-merge-users.in
+++ b/bin/rt-merge-users.in
@@ -10,7 +10,7 @@ my ($from, $into) = @ARGV;
 die "\n$usage\n" unless $from && $into;
 
 ### after: use lib qw(@RT_LIB_PATH@);
-use lib qw(/opt/rt4/local/lib /opt/rt4/lib);
+use lib qw(/opt/rt5/local/lib /opt/rt5/lib);
 use RT;
 RT::LoadConfig();
 RT::Init();
diff --git a/bin/rt-update-merged-users.in b/bin/rt-update-merged-users.in
index 34b53bc..75e6eb6 100755
--- a/bin/rt-update-merged-users.in
+++ b/bin/rt-update-merged-users.in
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 
 ### after: use lib qw(@RT_LIB_PATH@);
-use lib qw(/opt/rt4/local/lib /opt/rt4/lib);
+use lib qw(/opt/rt5/local/lib /opt/rt5/lib);
 use RT;
 RT::LoadConfig();
 RT::Init();
diff --git a/lib/RT/Extension/MergeUsers/Test.pm.in b/lib/RT/Extension/MergeUsers/Test.pm.in
index 1f9bb4b..1cfede6 100644
--- a/lib/RT/Extension/MergeUsers/Test.pm.in
+++ b/lib/RT/Extension/MergeUsers/Test.pm.in
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 
 ### after: use lib qw(@RT_LIB_PATH@);
-use lib qw(/opt/rt4/local/lib /opt/rt4/lib);
+use lib qw(/opt/rt5/local/lib /opt/rt5/lib);
 
 package RT::Extension::MergeUsers::Test;
 

commit ab521f64017a98f72bdc8d63c8a86c250a0d0f36
Author: craig kaiser <craig at bestpractical.com>
Date:   Thu Jul 9 16:47:26 2020 -0400

    Update POD to reference RT5

diff --git a/README b/README
index c75f3d7..d0422be 100644
--- a/README
+++ b/README
@@ -26,7 +26,7 @@ INSTALLATION
     make install
         May need root permissions
 
-    Edit your /opt/rt4/etc/RT_SiteConfig.pm
+    Edit your /opt/rt5/etc/RT_SiteConfig.pm
         If you are using RT 4.2 or greater, add this line:
 
             Plugin('RT::Extension::MergeUsers');
@@ -38,7 +38,7 @@ INSTALLATION
         or add RT::Extension::MergeUsers to your existing @Plugins line.
 
     Clear your mason cache
-            rm -rf /opt/rt4/var/mason_data/obj
+            rm -rf /opt/rt5/var/mason_data/obj
 
     Restart your webserver
 
diff --git a/lib/RT/Extension/MergeUsers.pm b/lib/RT/Extension/MergeUsers.pm
index 55928b9..b79346b 100644
--- a/lib/RT/Extension/MergeUsers.pm
+++ b/lib/RT/Extension/MergeUsers.pm
@@ -92,7 +92,7 @@ Be sure to also read L</UPGRADING> if you are upgrading.
 
 May need root permissions
 
-=item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
+=item Edit your F</opt/rt5/etc/RT_SiteConfig.pm>
 
 If you are using RT 4.2 or greater, add this line:
 
@@ -106,7 +106,7 @@ or add C<RT::Extension::MergeUsers> to your existing C<@Plugins> line.
 
 =item Clear your mason cache
 
-    rm -rf /opt/rt4/var/mason_data/obj
+    rm -rf /opt/rt5/var/mason_data/obj
 
 =item Restart your webserver
 

commit dd9b3128e850139c784108bf0a58f305a4b16456
Author: craig kaiser <craig at bestpractical.com>
Date:   Thu Jul 9 16:47:35 2020 -0400

    Update Module::Install

diff --git a/META.yml b/META.yml
index 5b7ec55..155f369 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.05'
-x_module_install_rtx_version: '0.40'
+x_module_install_rtx_version: '0.41'
 x_requires_rt: 4.0.0
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 7cad529..d371af9 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,7 +8,7 @@ no warnings 'once';
 
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.40';
+our $VERSION = '0.41';
 
 use FindBin;
 use File::Glob     ();
@@ -53,7 +53,7 @@ sub RTx {
         my @look = @INC;
         unshift @look, grep {defined and -d $_} @try;
         push @look, grep {defined and -d $_}
-            map { ( "$_/rt4/lib", "$_/lib/rt4", "$_/lib" ) } @prefixes;
+            map { ( "$_/rt5/lib", "$_/lib/rt5", "$_/rt4/lib", "$_/lib/rt4", "$_/lib" ) } @prefixes;
         last if eval {local @INC = @look; require RT; $RT::LocalLibPath};
 
         warn

commit 9e0a944e791eb1e03364930841d6d851cd2e10f0
Author: craig kaiser <craig at bestpractical.com>
Date:   Thu Jul 16 08:09:30 2020 -0400

    Include '.' in @inc

diff --git a/Makefile.PL b/Makefile.PL
index 7e9deb4..c159943 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,3 +1,4 @@
+use lib '.';
 use inc::Module::Install;
 
 RTx 'RT-Extension-MergeUsers';

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


More information about the Bps-public-commit mailing list