[Rt-commit] rtir branch, 4.0/correspondents-from-makeclicky, repushed

Brian Duggan brian at bestpractical.com
Thu Jun 7 20:11:34 EDT 2018


The branch 4.0/correspondents-from-makeclicky was deleted and repushed:
       was ec5ee069e85c3b4f38acd01c584ca9747e60b798
       now 9e6fce65c33296443245781c6efa163e189ffd09

1: bcb13751 = 1: bcb13751 Update MakeClicky test text for readability
2: d3de9323 = 2: d3de9323 Test for MakeClicky email links on all RTIR ticket types
-:  ------- > 3: d57c7c59 Do not test emails with special characters for MakeClicky links
3: 9139028a = 4: a512a310 Test for 'Investigate to' links next to MakeClicky email adddresses
4: 8f895fb8 ! 5: 6db6e97e Test Correspondents field on 'Investigate to' investigation creation
    @@ -20,21 +20,10 @@
              {
                  diag "test valid email $email" if $ENV{TEST_VERBOSE};
                  my ( $name, $domain ) = split /@/, $email, 2;
    -+            my $uri_escaped_email = $email;
    -+            RT::Interface::Web::EscapeURI(\$uri_escaped_email);
     +
                  my $id =
                    $create_method_ref->( { Subject => 'clicky email', Content => $email } );
                  $agent->display_ticket($id);
    -@@
    -             my $email_link = $agent->find_link( url_regex => qr/\Qq=$email\E/, text_regex => qr/\Qlookup email\E$/ );
    -             my $domain_link = $agent->find_link( text_regex => qr/^\Qlookup "$domain"\E$/i );
    - 
    --            my $investigate_link = $agent->find_link( url_regex => qr/\QRequestors=$email\E/,
    -+            my $investigate_link = $agent->find_link( url_regex => qr/\QRequestors=$uri_escaped_email\E/,
    -                                                    text_regex => qr/^\Qinvestigate to\E$/i ) if $is_incident;
    - 
    -             $agent->save_content('/tmp/x.html');
     @@
                      ok( $domain_link,                                    "Found link for URL domain" );
                      ok( $domain_link->url =~ /(?<!\w)\Q$domain\E(?!\w)/, 'URL link has a domain' );
    @@ -44,8 +33,7 @@
     +                # Then test taht the Correspondents field is populated with the given email address.
                      if ( $is_incident ) {
                          ok( $investigate_link, "found investigate link" );
    --                    ok( $investigate_link->url =~ /(?<!\w)\QRequestors=$email\E(?!\w)/,
    -+                    ok( $investigate_link->url =~ /(?<!\w)\QRequestors=$uri_escaped_email\E(?!\w)/,
    +                     ok( $investigate_link->url =~ /(?<!\w)\QRequestors=$email\E(?!\w)/,
                              'url '.$investigate_link->url.' has Requestors email' );
     +                    $agent->follow_link_ok( { url => $investigate_link->url }, 'followed "investigate to" link' );
     +                    $agent->title_is( 'Select Queue for New Investigation',
    @@ -63,7 +51,8 @@
     +                        type => 'text',
     +                        value => $email,
     +                    );
    -+                    is( $#correspondents, 0, "correspondents populated with $email");
    ++                    ok($correspondents[0], 'Found an email address');
    ++                    is($correspondents[0]->value, $email, 'Email is correct: ' . $correspondents[0]->value);
                      }
                  }
                  else {
5: ec5ee069 ! 6: 9e6fce65 Pass Requestors through queue selection modal if provided
    @@ -9,28 +9,6 @@
         This change adds Requestors to support the Investigate to
         link. Previously the "Investigate to" email addresses were being lost
         on the queue modal and not appearing in the Correspondents field.
    -
    -diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
    ---- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
    -+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
    -@@
    - 
    -         my $email = $args{'value'}; $email =~ s/^<|>$//g;
    -         my $escaped_email = $escaper->($email);
    -+        my $uri_escaped_email = $escaped_email;
    -+        RT::Interface::Web::EscapeURI(\$uri_escaped_email);
    - 
    -         my $result = qq{<a class="button button-small" href="}.
    -             RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=email&q=$escaped_email}). qq{">}
    -@@
    -                 RT::IR->HREFTo( "CreateInQueue.html"
    -                 . qq{?Incident=$args{'incident'}}
    -                 . qq{&Lifecycle=}.RT::IR->lifecycle_investigation
    --                . "&Requestors=$escaped_email")
    -+                . "&Requestors=$uri_escaped_email")
    -                 . qq{">}
    -                 . loc('Investigate to') .qq{</a>};
    -         }
     
     diff --git a/html/RTIR/Elements/CreateInRTIRQueueModal b/html/RTIR/Elements/CreateInRTIRQueueModal
     --- a/html/RTIR/Elements/CreateInRTIRQueueModal



More information about the rt-commit mailing list