[Rt-commit] rt branch, 4.4/download-user-info, repushed

Craig Kaiser craig at bestpractical.com
Fri Jun 15 19:30:06 EDT 2018


The branch 4.4/download-user-info was deleted and repushed:
       was 60befd86a9972c36fccc8836ca17a0b33a494fda
       now 0c94d3025e25436ec406721a7cb6f9dc3ea1fe55

1: a7061699c = 1: a7061699c Add column to transaction column map for content
2: 1f08f64e1 ! 2: 195b4b2a4 Add 'UserDataSearchResultFormat' config option
    @@ -11,7 +11,7 @@
      
     +=item C<$UserDataSearchResultFormat>
     +
    -+This is the format of ticket search result for "Download My Tickets" links. It 
    ++This is the format of ticket search result for "Download My Tickets" links. It
     +falls back to C<DefaultSearchResultFormat> if it's not set.
     +
     +=cut
3: cacec40fd ! 3: 9edf2ec81 Create helper for exporting user related information
    @@ -65,7 +65,7 @@
     +
     +<%INIT>
     +# Abort unless supported type for export found
    -+$m->abort unless
    ++Abort('Incorrect value passed for Type: ' . $Type) unless
     +    $Type && ( $Type eq 'User' || $Type eq 'Transaction');
     +
     +my $Collection;
4: 9a8c70327 ! 4: f210df8de Create portlet for downloading user information
    @@ -60,9 +60,9 @@
     +&>
     +
     +<div>
    -+    <a href="/Helpers/MyRelatedInfo.tsv?Type=User&UserId=<% $session{'CurrentUser'}->id %>" class="button"><&|/l&>Download My User Info</&></a>
    ++    <a href="/Helpers/MyRelatedInfo.tsv?Type=User" class="button"><&|/l&>Download My User Info</&></a>
     +    <a href="/Search/Results.tsv?Query=Requestor.id=<% $session{'CurrentUser'}->id %>&Format=<% $Format | un %>" class="button"><&|/l&>Download My Tickets</&></a>
    -+    <a href="/Helpers/MyRelatedInfo.tsv?Type=Transaction&UserId=<% $session{'CurrentUser'}->id %>" class="button"><&|/l&>Download My Transaction Info</&></a>
    ++    <a href="/Helpers/MyRelatedInfo.tsv?Type=Transaction" class="button"><&|/l&>Download My Transaction Info</&></a>
     +</div>
     +</&>
     +
5: d6d820155 = 5: 316be5d2d Add user download portlet to admin user modify page
6: 60befd86a ! 6: 0c94d3025 Create test for user information TSV download
    @@ -34,16 +34,13 @@
     +    my $id = $ticket->id;
     +    ok $id;
     +
    -+    $ticket->LoadById( $id );
     +    $ticket->Comment(Content    => 'Test - Comment');
    -+    $ticket->Correspond(Content => 'Test - Reply', CcMessageTo => 'Example at example.com');
    ++    $ticket->Correspond(Content => 'Test - Reply');
     +
    -+    my $date = RT::Date->new(RT->SystemUser);
     +    my @dates;
     +    my $trans = $ticket->Transactions;
     +    while (my $tran = $trans->Next) {
    -+        $date->Set(Format => 'ISO', Value => $tran->Created);
    -+        push @dates, $date->AsString;
    ++        push @dates, $tran->CreatedObj->AsString;
     +    }
     +    my ($date_created, $date_commented, $date_correspondence) = @dates;
     +
    @@ -56,7 +53,7 @@
     +14\troot\troot\@localhost\tEnoch Root\t\t\t\t\t\t\t\t\t\t\t\t\troot\t\t
     +EOF
     +
    -+    is $user_info_tsv, $agent->content, "User record information downloaded correctly";
    ++    is $agent->content, $user_info_tsv, "User record information downloaded correctly";
     +
     +    # TSV file for Transactions
     +    $agent->get_ok( $url . "/Admin/Users/Modify.html?id=" . $root->id );
    @@ -69,7 +66,7 @@
     +1\t33\t$date_correspondence\tCorrespondence added\t\t\tTest - Reply
     +EOF
     +
    -+    is $transaction_info_tsv, $agent->content, "User transaction information downloaded correctly";
    ++    is $agent->content, $transaction_info_tsv, "User transaction information downloaded correctly";
     +
     +    # TSV file for user's Tickets
     +    $agent->get_ok( $url . "/Admin/Users/Modify.html?id=" . $root->id );
    @@ -80,7 +77,7 @@
     +1\tTest\topen\tGeneral\tNobody in particular\t0\troot (Enoch Root)
     +EOF
     +
    -+    is $ticket_info_tsv, $agent->content, "User tickets downloaded correctly";
    ++    is $agent->content, $ticket_info_tsv, "User tickets downloaded correctly";
     +}
     +
     +done_testing();



More information about the rt-commit mailing list