[Rt-commit] rt branch, 4.4/query-builder-operator-for-null, repushed

? sunnavy sunnavy at bestpractical.com
Thu Apr 5 10:30:11 EDT 2018


The branch 4.4/query-builder-operator-for-null was deleted and repushed:
       was 0065a2038cd10bbc572d4b86e467677eb99f233a
       now bc6b5be412e6f2241e9b9d0e0437a85b3b1eb070

1: 605a43bc8 = 1: 605a43bc8 Set operator to "IS" or "IS NOT" for NULL values
2: 0065a2038 ! 2: bc6b5be41 Test null values in query builder
    @@ -24,36 +24,33 @@
     +        { Subject => 'ticket null' },
     +    );
     +
    -+    my ( $baseurl, $m ) = RT::Test->started_ok;
    -+    ok( $m->login, 'logged in' );
    -+
    -+    $m->get_ok( '/Search/Build.html' );
    -+    $m->submit_form(
    ++    $agent->get_ok( '/Search/Build.html?NewQuery=1' );
    ++    $agent->submit_form(
     +        form_name => 'BuildQuery',
     +        fields    => { 'CF.{foo}Op' => '=', 'ValueOfCF.{foo}' => 'NULL', },
     +        button    => 'DoSearch',
     +    );
     +
    -+    $m->title_is( 'Found 2 tickets', 'found 2 tickets with CF.{foo} IS NULL' );
    ++    $agent->title_is( 'Found 2 tickets', 'found 2 tickets with CF.{foo} IS NULL' );
     +    # the other ticket was created before the block
    -+    $m->content_contains( 'ticket null', 'has ticket null' );
    -+    $m->follow_link_ok( { text => 'Advanced' } );
    -+    $m->text_lacks( q[CF.{foo} = 'NULL'] );
    -+    $m->text_contains( 'CF.{foo} IS NULL', q["= 'NULL'" is converted to "IS NULL"] );
    ++    $agent->content_contains( 'ticket null', 'has ticket null' );
    ++    $agent->follow_link_ok( { text => 'Advanced' } );
    ++    $agent->text_lacks( q[CF.{foo} = 'NULL'] );
    ++    $agent->text_contains( 'CF.{foo} IS NULL', q["= 'NULL'" is converted to "IS NULL"] );
     +
    -+    $m->get_ok( '/Search/Build.html?NewQuery=1' );
    -+    $m->submit_form(
    ++    $agent->get_ok( '/Search/Build.html?NewQuery=1' );
    ++    $agent->submit_form(
     +        form_name => 'BuildQuery',
     +        fields    => { 'CF.{foo}Op' => '!=', 'ValueOfCF.{foo}' => 'NULL', },
     +        button    => 'DoSearch',
     +    );
     +
    -+    $m->title_is( 'Found 2 tickets', 'found 2 ticket with CF.{foo} IS NOT NULL' );
    -+    $m->content_contains( 'ticket bar', 'has ticket bar' );
    -+    $m->content_contains( 'ticket baz', 'has ticket baz' );
    -+    $m->follow_link_ok( { text => 'Advanced' } );
    -+    $m->text_lacks( q[CF.{foo} != 'NULL'] );
    -+    $m->text_contains( 'CF.{foo} IS NOT NULL', q["!= 'NULL'" is converted to "IS NOT NULL"] );
    ++    $agent->title_is( 'Found 2 tickets', 'found 2 ticket with CF.{foo} IS NOT NULL' );
    ++    $agent->content_contains( 'ticket bar', 'has ticket bar' );
    ++    $agent->content_contains( 'ticket baz', 'has ticket baz' );
    ++    $agent->follow_link_ok( { text => 'Advanced' } );
    ++    $agent->text_lacks( q[CF.{foo} != 'NULL'] );
    ++    $agent->text_contains( 'CF.{foo} IS NOT NULL', q["!= 'NULL'" is converted to "IS NOT NULL"] );
     +}
     +
      done_testing;



More information about the rt-commit mailing list