[Bps-public-commit] rt-extension-rest2 branch, transaction-cfs, repushed

Jim Brandt jbrandt at bestpractical.com
Fri Aug 16 17:20:55 EDT 2019


The branch transaction-cfs was deleted and repushed:
       was f7de9be5b32583e1d13b2d969f4771cd1a9af90a
       now e3b6480cc0454e0c617f7b5a7c78a1c4059a1bfc

1:  460500d = 1:  460500d Add Transaction Custom Field updates on Correspond and Comment
2:  3c29c50 = 2:  3c29c50 Move custom field updater to Utils for use elsewhere
3:  52ef66d = 3:  52ef66d Add custom fields on comment and correspond
4:  4e81bda = 4:  4e81bda No need to pass EmptyTxn to get custom field input names
5:  cf8a9eb = 5:  cf8a9eb Always call txn->UpdateCustomFields for txn cfs with default values
6:  eb62986 = 6:  eb62986 Prep 1.08 release
7:  77e3d0e < -:  ------- Return custom field information for queues
8:  f7de9be ! 7:  94a5403 Add custom field names in hyperlink data
    @@ -37,12 +37,55 @@
     +++ b/xt/queues.t
     @@
      
    -     is($links->[1]{ref}, 'customfield');
    -     like($links->[1]{_url}, qr[$rest_base_path/customfield/$single_cf_id$]);
    + $user->PrincipalObj->GrantRight( Right => 'SuperUser' );
    + 
    ++my $queue_obj = RT::Test->load_or_create_queue( Name => "General" );
    ++
    ++my $single_cf = RT::CustomField->new( RT->SystemUser );
    ++
    ++my ($ok, $msg) = $single_cf->Create( Name => 'Single', Type => 'FreeformSingle', LookupType => RT::Queue->CustomFieldLookupType );
    ++ok($ok, $msg);
    ++
    ++($ok, $msg) = $single_cf->AddToObject($queue_obj);
    ++ok($ok, $msg);
    ++my $single_cf_id = $single_cf->Id;
    ++
    + my $queue_url;
    + # search Name = General
    + {
    +@@
    +     ok(exists $content->{$_}, "got $_") for @fields;
    + 
    +     my $links = $content->{_hyperlinks};
    +-    is(scalar @$links, 3);
    ++    is(scalar @$links, 4);
    + 
    +     is($links->[0]{ref}, 'self');
    +     is($links->[0]{id}, 1);
    +     is($links->[0]{type}, 'queue');
    +     like($links->[0]{_url}, qr[$rest_base_path/queue/1$]);
    + 
    +-    is($links->[1]{ref}, 'history');
    +-    like($links->[1]{_url}, qr[$rest_base_path/queue/1/history$]);
    ++    is($links->[1]{ref}, 'customfield');
    ++    like($links->[1]{_url}, qr[$rest_base_path/customfield/$single_cf_id$]);
     +    is($links->[1]{name}, 'Single');
      
    -     is($links->[2]{ref}, 'history');
    -     like($links->[2]{_url}, qr[$rest_base_path/queue/1/history$]);
    +-    is($links->[2]{ref}, 'create');
    +-    is($links->[2]{type}, 'ticket');
    +-    like($links->[2]{_url}, qr[$rest_base_path/ticket\?Queue=1$]);
    ++    is($links->[2]{ref}, 'history');
    ++    like($links->[2]{_url}, qr[$rest_base_path/queue/1/history$]);
    ++
    ++    is($links->[2]{ref}, 'history');
    ++    like($links->[2]{_url}, qr[$rest_base_path/queue/1/history$]);
    ++
    ++    is($links->[3]{ref}, 'create');
    ++    is($links->[3]{type}, 'ticket');
    ++    like($links->[3]{_url}, qr[$rest_base_path/ticket\?Queue=1$]);
    + 
    +     my $creator = $content->{Creator};
    +     is($creator->{id}, 'RT_System');
     
     diff --git a/xt/ticket-customfields.t b/xt/ticket-customfields.t
     --- a/xt/ticket-customfields.t
    @@ -61,3 +104,4 @@
                  type => 'customfield',
                  _url => re(qr[$rest_base_path/customfield/$multi_cf_id$]),
              }],
    +
-:  ------- > 8:  e3b6480 Provide Ticket and Transaction CFs for queue lookup



More information about the Bps-public-commit mailing list