[Bps-public-commit] RT-Extension-MergeUsers branch, update-for-rt5, created. 1.05-6-ge21f9e9
Craig Kaiser
craig at bestpractical.com
Fri Jul 17 10:49:39 EDT 2020
The branch, update-for-rt5 has been created
at e21f9e96a20fc5d9b09392ecd27a01d64f47f831 (commit)
- Log -----------------------------------------------------------------
commit f45a1f0383317fc8526bcba463911eae10d4c26a
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..0f3e8ce 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 3144187670553d728927700f6ae5c15d68af200b
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 eee33522420931a9a452db13a864e7fe36a7cb69
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 19edde9c45b1947db3378b85fbc48ac677778e14
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 e21f9e96a20fc5d9b09392ecd27a01d64f47f831
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