[Rt-commit] rt branch, 5.0/dashboards-to-report-menu, updated. rt-5.0.0alpha1-93-g757ca3e819
Michel Rodriguez
michel at bestpractical.com
Wed Apr 29 08:48:54 EDT 2020
The branch, 5.0/dashboards-to-report-menu has been updated
via 757ca3e819634d89cd9f1ffa2c5168d2bb51edb8 (commit)
from e711077ee4e1addc9d146fa508da6233d087b9aa (commit)
Summary of changes:
etc/upgrade/4.5.5/content | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 etc/upgrade/4.5.5/content
- Log -----------------------------------------------------------------
commit 757ca3e819634d89cd9f1ffa2c5168d2bb51edb8
Author: michel <michel at bestpractical.com>
Date: Tue Apr 28 18:08:44 2020 +0200
Add upgrade step: create the ReportsInMenu attribute if needed.
diff --git a/etc/upgrade/4.5.5/content b/etc/upgrade/4.5.5/content
new file mode 100644
index 0000000000..530075fa3a
--- /dev/null
+++ b/etc/upgrade/4.5.5/content
@@ -0,0 +1,41 @@
+use strict;
+use warnings;
+
+our @Initial = (
+ # add default reports
+ sub {
+ my $reports_in_menu = 'ReportsInMenu';
+ my $attr = RT::Attribute->new( RT->System );
+ my( $ok, $msg) = $attr->LoadByNameAndObject( Object => RT->System, Name => $reports_in_menu );
+ # add attribute only if it does not already exist
+ if( ! $ok ) {
+ RT->Logger->debug( "Adding default reports in menu" );
+ my $content = [
+ {
+ id => 'resolvedbyowner',
+ title => 'Resolved by owner', # loc
+ path => '/Reports/ResolvedByOwner.html',
+ description => 'Examine tickets resolved in a queue, grouped by owner', #loc
+ },
+ {
+ id => 'resolvedindaterange',
+ title => 'Resolved in date range', # loc
+ path => '/Reports/ResolvedByDates.html',
+ description => 'Examine tickets resolved in a queue between two dates', # loc
+ },
+ {
+ id => 'createdindaterange',
+ title => 'Created in a date range', # loc
+ path => '/Reports/CreatedByDates.html',
+ description => 'Examine tickets created in a queue between two dates', # loc
+ },
+ ];
+
+ RT->System->AddAttribute(
+ Name => $reports_in_menu,
+ Description => 'Content of the Reports menu',
+ Content => $content,
+ );
+ }
+ }
+);
-----------------------------------------------------------------------
More information about the rt-commit
mailing list