[Bps-public-commit] RT-Extension-MergeUsers branch, master, updated. 0.08-7-gf0c4c2b
Alex Vandiver
alexmv at bestpractical.com
Fri Mar 22 18:39:32 EDT 2013
The branch, master has been updated
via f0c4c2b387ccef645f65a5e0d6d79dcfc36c4b78 (commit)
via c7467a91c9178ccedb7751b09bf61523553f1b7d (commit)
from 354edf0b420ce024b0abb6d87445762509d8a95f (commit)
Summary of changes:
.../Admin/Users/Modify.html/RightColumnBottom | 6 +++---
.../User/Elements/TicketList/ModifyWatcherSQL | 18 ++++++++++++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
create mode 100644 html/Callbacks/RT-Extension-MergeUsers/User/Elements/TicketList/ModifyWatcherSQL
- Log -----------------------------------------------------------------
commit c7467a91c9178ccedb7751b09bf61523553f1b7d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Mar 22 15:37:39 2013 -0700
Since 399c04b, we store empty MergedUsers attributes on all users
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 cae54a9..cd6e69a 100644
--- a/html/Callbacks/RT-Extension-MergeUsers/Admin/Users/Modify.html/RightColumnBottom
+++ b/html/Callbacks/RT-Extension-MergeUsers/Admin/Users/Modify.html/RightColumnBottom
@@ -49,15 +49,15 @@
<&| /Widgets/TitleBox, title => loc('Merge user') &>
<p class="error"><% $result||'' %></p>
% my ($EffectiveId) = $UserObj->Attributes->Named("EffectiveId");
-% my $MergedUsers = $UserObj->FirstAttribute('MergedUsers');
+% my @MergedUsers = @{$UserObj->GetMergedUsers->Content};
% if ($EffectiveId) {
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>; <input type="submit" name="Unmerge" value="Unmerge" />
-% } elsif ($MergedUsers) {
+% } elsif (@MergedUsers) {
The following users have been merged into this user:<br>
-% foreach my $user_id (@{$MergedUsers->Content}) {
+% foreach my $user_id (@MergedUsers) {
% my $user = RT::User->new($session{'CurrentUser'});
% $user->LoadOriginal(Id => $user_id);
<% $user->NameAndEmail %><input type="submit" name="Unmerge<%$user_id%>" value="Unmerge"><br>
commit f0c4c2b387ccef645f65a5e0d6d79dcfc36c4b78
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Mar 22 15:38:55 2013 -0700
In RT 4.2, make related ticket listings include those for merged users
diff --git a/html/Callbacks/RT-Extension-MergeUsers/User/Elements/TicketList/ModifyWatcherSQL b/html/Callbacks/RT-Extension-MergeUsers/User/Elements/TicketList/ModifyWatcherSQL
new file mode 100644
index 0000000..9d23795
--- /dev/null
+++ b/html/Callbacks/RT-Extension-MergeUsers/User/Elements/TicketList/ModifyWatcherSQL
@@ -0,0 +1,18 @@
+<%INIT>
+my @ids = ($User->id, @{$User->GetMergedUsers->Content});
+
+my @conditions;
+for my $type (@WatcherTypes) {
+ for my $id (@ids) {
+ push @conditions, "$type.id = $id";
+ }
+}
+
+$$sql = "( ". join(" OR ", @conditions) . " )";
+
+</%INIT>
+<%ARGS>
+ at WatcherTypes => (qw(Watcher))
+$User => undef
+$sql => undef
+</%ARGS>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list