[Rt-commit] rt branch, 4.6/configindatabase-themed, repushed

Blaine Motsinger blaine at bestpractical.com
Fri Nov 22 14:49:11 EST 2019


The branch 4.6/configindatabase-themed was deleted and repushed:
       was 4d7594e5111450930b1611e6ef9cf7b7b0b0524d
       now e2d543a33587bfb049dbbd5462b3e498d5e47d22

 1: b28dc30467 =  1: b28dc30467 Allow specifying size for Integer and String widgets
 2: 94744da2c6 =  2: 94744da2c6 Allow String widget to have a value of "0"
 3: 59334314c9 =  3: 59334314c9 Add RadioStyle option to Boolean widget
 4: 534bba3102 =  4: 534bba3102 Make booleans with RadioStyle use true/false logic
 5: baf23200cd =  5: baf23200cd DatabaseSetting schema updates
 6: a888aa6cb0 =  6: a888aa6cb0 Add ORM classes for DatabaseSettings
 7: 05db0b9b37 =  7: 05db0b9b37 Port database config loading and refreshing from extension
 8: 7648dd10f1 =  8: 7648dd10f1 Add Code and MultilineString widgets
 9: 21f6abfb8c =  9: 21f6abfb8c Port EditConfig page from extension
10: 165422a396 = 10: 165422a396 Annotate Immutable options
11: f2f0b772d7 = 11: f2f0b772d7 Add widget metadata for config options
12: 5803325e5f = 12: 5803325e5f Hide deprecated options
13: b878fb9786 = 13: b878fb9786 List Database as source of configuration on Sys Config page
14: 02b6a1a9fb = 14: 02b6a1a9fb Render config with EditLink as readonly
15: 94cbaf03d2 = 15: 94cbaf03d2 Switch from Storable::dclone to Clone::clone to handle code/regex
16: c0d5683bfb = 16: c0d5683bfb Migrate MultilineString to new themes
17: 9fcde4980a = 17: 9fcde4980a Add LabelLink support for form widgets
18: 1eee9b8f55 = 18: 1eee9b8f55 Vertically align boolean label/value
19: fb5f04660a = 19: fb5f04660a Add tabs to the Configuration in DB feature
20: 21ff2fa0c2 = 20: 21ff2fa0c2 Add missing config options to %META
21: 5523105073 = 21: 5523105073 Rename DatabaseSetting to Configuration
22: d80765bfaf = 22: d80765bfaf Validate Content of Configurations
23: 1ada6c8511 = 23: 1ada6c8511 Use Data::Dumper instead in Configuration to support regex
24: 165ca1445f = 24: 165ca1445f Note RT::Extension::ConfigInDatabase is cored and the main backend change
25: 4d7594e511 ! 25: e2d543a335 Add test for /Admin/Tools/EditConfig.html
    @@ -13,6 +13,8 @@
     +use strict;
     +use warnings;
     +
    ++use Data::Dumper ();
    ++
     +use RT::Test tests => undef;
     +
     +my ( $url, $m ) = RT::Test->started_ok;
    @@ -27,7 +29,7 @@
     +        setting   => 'CorrespondAddress',
     +        new_value => 'rt-correspond-edited at example.com',
     +    },
    -+    {  
    ++    {
     +        name      => 'change a boolean value',
     +        form_id   => 'form-System-Outgoing_mail',
     +        setting   => 'NotifyActor',
    @@ -37,13 +39,13 @@
     +        name      => 'change an arrayref value',
     +        form_id   => 'form-System-Extra_security',
     +        setting   => 'ReferrerWhitelist',
    -+        new_value => stringify( ['www.example.com:443', 'www3.example.com:80'] ),
    ++        new_value => ['www.example.com:443', 'www3.example.com:80'],
     +    },
     +    {
     +        name      => 'change a hashref value',
     +        form_id   => 'form-System-Outgoing_mail',
     +        setting   => 'OverrideOutgoingMailFrom',
    -+        new_value => stringify( { 1 => 'new-outgoing-from at example.com' } ),
    ++        new_value => { 1 => 'new-outgoing-from at example.com' },
     +    },
     +];
     +
    @@ -52,30 +54,38 @@
     +sub run_test {
     +    my %args = @_;
     +
    ++    $args{new_value} = stringify( $args{new_value} ) if ref $args{new_value};
    ++
     +    note $args{name} if $ENV{TEST_VERBOSE};
    -+    
    ++
     +    $m->submit_form_ok(
    -+        {   
    ++        {
     +            form_id => $args{form_id},
    -+            fields  => { 
    ++            fields  => {
     +                $args{setting} => $args{new_value}
     +            },
     +        },
     +        'form was submitted successfully'
     +    );
     +
    ++    RT->Config->LoadConfigFromDatabase();
    ++
     +    $m->content_like( qr/$args{setting} changed from/, 'UI indicated the value was changed' );
    -+    
    -+    my $config_value = RT::Configuration->new( RT->SystemUser );
    -+    $config_value->Load( $args{setting} );
    -+    
    -+    is( $config_value->Content, $args{new_value}, 'new value was changed in the config' );
    ++
    ++    my $rt_configuration = RT::Configuration->new( RT->SystemUser );
    ++    $rt_configuration->Load( $args{setting} );
    ++    my $rt_configuration_value = $rt_configuration->Content;
    ++
    ++    my $rt_config_value = RT->Config->Get( $args{setting} );
    ++    $rt_config_value = stringify( $rt_config_value ) if ref $rt_config_value;
    ++
    ++    is( $rt_configuration_value, $args{new_value}, 'value from RT::Configuration->Load matches new value' );
    ++    is( $rt_config_value, $args{new_value}, 'value from RT->Config->Get matches new value' );
     +}
     +
     +sub stringify {
     +    my $value = shift;
     +
    -+    require Data::Dumper;
     +    local $Data::Dumper::Terse = 1;
     +    local $Data::Dumper::Indent = 2;
     +    local $Data::Dumper::Sortkeys = 1;



More information about the rt-commit mailing list