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

Michel Rodriguez michel at bestpractical.com
Fri May 1 11:52:07 EDT 2020


The branch 5.0/dashboards-to-report-menu was deleted and repushed:
       was 757ca3e819634d89cd9f1ffa2c5168d2bb51edb8
       now b6e42c6d0bfa43a179c990d95d62f8221a7e8c00

1: 26bc02f337 = 1: 26bc02f337 Moved initial dashboards to the Reports menu.
2: e711077ee4 ! 2: 6227e37fe2 Get the list of reports in the reports in the Reports menu from pref/attribute.
    @@ -72,22 +72,24 @@
     -        description => loc('Examine tickets created in a queue between two dates'),
     -    );
     +    # get the list of reports in the Reports menu
    -+    unless ($HTML::Mason::Commands::session{'reports_in_menu'} && @{$HTML::Mason::Commands::session{'reports_in_menu'}}) {
    ++    unless (   $HTML::Mason::Commands::session{'reports_in_menu'}
    ++            && ref( $HTML::Mason::Commands::session{'reports_in_menu'}) eq 'ARRAY'
    ++            && @{$HTML::Mason::Commands::session{'reports_in_menu'}}
    ++           ) {
     +        my $reports_in_menu = $current_user->UserObj->Preferences(
     +            'ReportsInMenu',
     +            {},
     +        );
    -+
    -+        unless ($reports_in_menu->{reports}) {
    ++        unless ($reports_in_menu && ref( $reports_in_menu) eq 'ARRAY' ) {
     +            my ($default_reports) =
    -+                RT::System->new( $current_user )
    ++                RT::System->new( RT->SystemUser )
     +                    ->Attributes
     +                    ->Named('ReportsInMenu');
     +            if ($default_reports) {
     +                $reports_in_menu = $default_reports->Content;
     +            }
     +            else {
    -+                $reports_in_menu = $default_reports->Content;
    ++                $reports_in_menu = [];
     +            }
     +        }
     +
    @@ -96,9 +98,9 @@
     +
     +    for my $report ( @{$HTML::Mason::Commands::session{'reports_in_menu'}} ) {
     +        $reports->child(  $report->{id} =>
    -+            title       => $report->{title}, # loc
    ++            title       => $report->{title},
     +            path        => $report->{path},
    -+            description => $report->{description}, # loc
    ++            description => $report->{description},
     +        );
     +    }
      
3: 757ca3e819 ! 3: 2c186b74b8 Add upgrade step: create the ReportsInMenu attribute if needed.
    @@ -48,3 +48,4 @@
     +        }
     +    }    
     +);
    +
-:  ------- > 4: b6e42c6d0b Fix tests to reflect changes in dashboard menu ids.



More information about the rt-commit mailing list