[Rt-commit] rt branch, 5.0/dashboards-to-report-menu-2, repushed

? sunnavy sunnavy at bestpractical.com
Tue May 5 17:31:17 EDT 2020


The branch 5.0/dashboards-to-report-menu-2 was deleted and repushed:
       was 8cbb0cd8eec1b600444d463846cd7f525fa46765
       now 6742e9544ed8554cdb18d0e3e34ee6f7132095b1

 1: 71e7eb52aa !  1: 82136e8b8f Moved initial dashboards to the Reports menu.
    @@ -64,14 +64,6 @@
          my $search = $top->child( search => title => loc('Search'), path => '/Search/Simple.html' );
      
          my $tickets = $search->child( tickets => title => loc('Tickets'), path => '/Search/Build.html' );
    -@@
    -         $search_assets->child("assetsql", title => loc("New Search"), path => "/Search/Build.html?Class=RT::Assets;NewQuery=1");
    -     }
    - 
    --
    -     my $txns = $search->child( transactions => title => loc('Transactions'), path => '/Search/Build.html?Class=RT::Transactions;ObjectType=RT::Ticket' );
    -     my $txns_tickets = $txns->child( tickets => title => loc('Tickets'), path => "/Search/Build.html?Class=RT::Transactions;ObjectType=RT::Ticket" );
    -     $txns_tickets->child( new => title => loc('New Search'), path => "/Search/Build.html?Class=RT::Transactions;ObjectType=RT::Ticket;NewQuery=1" );
     @@
              description => loc('Reports summarizing ticket resolution and status'),
              path        => loc('/Reports'),
 2: 9023b83ed1 !  2: 16957ce4c8 Get the list of reports in the Reports menu from attribute
    @@ -20,17 +20,17 @@
     +          {
     +              id          => 'resolvedbyowner',
     +              title       => 'Resolved by owner', # loc
    -+              file        => 'ResolvedByOwner.html',
    ++              path        => '/Reports/ResolvedByOwner.html',
     +          },
     +          {
     +              id          => 'resolvedindaterange',
     +              title       => 'Resolved in date range', # loc
    -+              file        => 'ResolvedByDates.html',
    ++              path        => '/Reports/ResolvedByDates.html',
     +          },
     +          {
     +              id          => 'createdindaterange',
     +              title       => 'Created in a date range', # loc
    -+              file        => 'CreatedByDates.html',
    ++              path        => '/Reports/CreatedByDates.html',
     +          },
     +      ],
     +    },
    @@ -41,14 +41,6 @@
     diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
     --- a/lib/RT/Interface/Web/MenuBuilder.pm
     +++ b/lib/RT/Interface/Web/MenuBuilder.pm
    -@@
    -         }
    -     }
    - 
    -+
    -     if (@dashboards) {
    -         for my $dash (@dashboards) {
    -             $reports->child( 'dashboard-' . $dash->id,
     @@
              }
          }
    @@ -77,7 +69,7 @@
     +            'ReportsInMenu',
     +            {},
     +        );
    -+        unless ($reports_in_menu && ref( $reports_in_menu) eq 'ARRAY' ) {
    ++        unless ( $reports_in_menu && ref $reports_in_menu eq 'ARRAY' ) {
     +            my ($default_reports) =
     +                RT::System->new( RT->SystemUser )
     +                    ->Attributes
    @@ -96,7 +88,7 @@
     +    for my $report ( @{$HTML::Mason::Commands::session{'reports_in_menu'}} ) {
     +        $reports->child(  $report->{id} =>
     +            title       => $report->{title},
    -+            path        => '/Reports/' . $report->{file},
    ++            path        => $report->{path},
     +        );
     +    }
      
 3: f204daa147 !  3: 64138321a3 Add upgrade step: create the ReportsInMenu attribute if needed.
    @@ -14,26 +14,26 @@
     +    # add default reports
     +    sub {
     +        my $reports_in_menu = 'ReportsInMenu';
    -+        my $attr = RT::Attribute->new( RT->System );
    ++        my $attr = RT::Attribute->new( RT->SystemUser );
     +        my( $ok, $msg) = $attr->LoadByNameAndObject( Object => RT->System, Name => $reports_in_menu );
     +        # add attribute only if it does not already exist
    -+        if( ! $ok ) {
    ++        if ( !$ok ) {
     +            RT->Logger->debug( "Adding default reports in menu" );
     +            my $content = [
     +                {
     +                    id          => 'resolvedbyowner',
     +                    title       => 'Resolved by owner', # loc
    -+                    file        => 'ResolvedByOwner.html',
    ++                    path        => '/Reports/ResolvedByOwner.html',
     +                },
     +                {
     +                    id          => 'resolvedindaterange',
     +                    title       => 'Resolved in date range', # loc
    -+                    file        => 'ResolvedByDates.html',
    ++                    path        => '/Reports/ResolvedByDates.html',
     +                },
     +                {
     +                    id          => 'createdindaterange',
     +                    title       => 'Created in a date range', # loc
    -+                    file        => 'CreatedByDates.html',
    ++                    path        => '/Reports/CreatedByDates.html',
     +                },
     +            ];
     +
 4: af63a1c0f2 =  4: f046ab5d51 Fix tests to reflect changes in dashboard menu ids.
 5: 45745923fc < --:  ------- Update report menu description and remove link
 6: 663a3c7371 < --:  ------- Add and remove reports from the Reports menu
 7: f063bf4fb1 < --:  ------- Add reports to global reports menu editor
 8: 91fb000077 < --:  ------- Add reports to user admin menu edit
--:  ------- >  5: decfb5af82 Update report menu description
--:  ------- >  6: c495b9bc38 Add and remove reports from the Reports menu
--:  ------- >  7: 6aaee7e842 Add reports to global reports menu editor
--:  ------- >  8: f5618d678e Add reports to user admin menu edit
 9: 8cbb0cd8ee !  9: f92c9786c4 Update label to reflect new Reports menu location
    @@ -32,3 +32,4 @@
                          path  => '/Admin/Users/DashboardsInMenu.html?id=' . $id,
                      );
                      if ( RT->Config->Get('Crypt')->{'Enable'} ) {
    +
--:  ------- > 10: 6742e9544e Update dashboard pref tests as we updated reset input name



More information about the rt-commit mailing list