[Rt-commit] rt branch, 5.0/remove-catalog-modal, repushed

Michel Rodriguez michel at bestpractical.com
Thu Feb 27 09:57:03 EST 2020


The branch 5.0/remove-catalog-modal was deleted and repushed:
       was 17e15495ccc052a7a508b9699fd75491461a9822
       now 7546e0518870245f7205d431cc6b2bcb276a89d3

1: 04a53ab65 ! 1: 996302c7d Select Catalog in Asset Create page.
    @@ -37,7 +37,7 @@
              <&| /Widgets/TitleBox, title => loc("Basics"), class => "asset-basics", title_class => "inverse" &>
     -          <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog &>
     -        </&>
    -+          <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog, AutoSubmit => 1&>
    ++          <& Elements/EditBasics, %ARGS, AssetObj => $asset, CatalogObj => $catalog, AutoSubmit => 1 &>
     +       </&>
            </div>
      
    @@ -108,7 +108,7 @@
      $Default => undef
      $UpdateSession => 1
      $ShowNullOption => 0
    -+$AutoSubmit      => 0
    ++$AutoSubmit     => 0
      </%args>
      <%init>
      my $catalog_obj = LoadDefaultCatalog($Default || '');
2: cad2a52c8 ! 2: e07ee4d4a Test catalog select on asset create page
    @@ -63,10 +63,12 @@
     +RT->Config->Set(
     +    Lifecycles => %{$lifecycles},
     +    foo        => {
    -+        initial  => ['initial'],
    ++        type => 'asset',
    ++        initial  => ['new'],
     +        active   => ['tracked'],
     +        inactive => ['retired'],
    -+    }
    ++        defaults => { on_create => 'new', },
    ++    },
     +);
     +RT::Lifecycle->FillCache();
     +
    @@ -76,19 +78,18 @@
     +my $catalog_1 = RT::Test::Assets->load_or_create_catalog( Name => 'Default catalog' );
     +ok( $catalog_1, 'created catalog 1' );
     +my $catalog_2 = RT::Test::Assets::->load_or_create_catalog( Name => 'Another catalog' );
    -+ok( $catalog_2, 'created catalog 2' );
    ++ok( $catalog_2, 'created catalog 2 id:' . $catalog_2->id );
     +my $user   = RT::Test::Assets->load_or_create_user(
     +    Name     => 'user',
     +    Password => 'password',
     +);
     +
     +my ( $baseurl, $m ) = RT::Test->started_ok;
    ++ok $m->login;
     +
     +#set up lifecycle for catalog 2
    -+ok $m->login;
    -+$m->get_ok( '/Admin/Assets/Catalogs/Modify.html?id=' . $catalog_2->id );
    -+$m->form_name('ModifyCatalog');
    -+$m->submit_form( fields => { Lifecycle => 'foo' } );
    ++$catalog_2->SetLifecycle( 'foo');
    ++is( $catalog_2->Lifecycle, 'foo', 'catalog lifecycle changed to foo' );
     +
     +# set up custom field on catalog 2
     +my $cf = RT::Test::Assets::create_cf( Name => 'test_cf', Catalog => $catalog_2->Name, Type => 'FreeformSingle' );
    @@ -121,10 +122,9 @@
     +
     +my $form         = $m->form_name('CreateAsset');
     +my $status_input = $form->find_input('Status');
    -+note( "values: " . join( ' - ', map { "[$_]" } $status_input->possible_values ) );
     +is_deeply(
     +    [ $status_input->possible_values ],
    -+    [ 'initial', 'tracked', 'retired' ],
    ++    [ 'new', 'tracked', 'retired' ],
     +    'status selectbox shows custom lifecycle for queue'
     +);
     +note('submit populated form');
3: 17e15495c < -:  ------- Improved lifecycle test.
-:  ------- > 3: 6c8534b92 Remove select catalog modal popup on asset creation.
-:  ------- > 4: 7546e0518 Fixed tests to pass without modal catalog choice.



More information about the rt-commit mailing list