[Rt-commit] [rtir] 01/01: Replace DefaultSummaryRows preference with SummaryRows
Alex Vandiver
alexmv at bestpractical.com
Thu Oct 30 14:25:52 EDT 2014
This is an automated email from the git hooks/post-receive script.
alexmv pushed a commit to branch 3.0/homepage-summaryrows
in repository rtir.
commit 8c8702278a0ed4f2e3cda219dacc776f25312286
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Oct 30 14:06:18 2014 -0400
Replace DefaultSummaryRows preference with SummaryRows
DefaultSummaryRows was, until bestpractical/rt at 82c52177, a user override
of the global $DefaultSummaryRows configuration, which was used as the
default value for the SummaryRows _preference_ displayed on
/Prefs/MyRT.html This preference for a default for a preference was
unhelpful, and was removed in the aforementioned commit.
Instead, use the SummaryRows preference's value directly, falling back
to the global $DefaultSummaryRows value if that is unset. This allows
the /Prefs/MyRT.html setting to take effect for the portlets on the RTIR
homepage.
---
html/RTIR/Elements/DueIncidents | 7 ++++++-
html/RTIR/Elements/NewReports | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/html/RTIR/Elements/DueIncidents b/html/RTIR/Elements/DueIncidents
index 3b25cc3..b387631 100644
--- a/html/RTIR/Elements/DueIncidents
+++ b/html/RTIR/Elements/DueIncidents
@@ -71,6 +71,11 @@ Description => loc('Due Incidents')
</&>
<%INIT>
+$Rows = $session{'CurrentUser'}->UserObj->Preferences(
+ 'SummaryRows',
+ ( RT->Config->Get('DefaultSummaryRows') || 10 ),
+) unless defined $Rows;
+
my $QueryString = $m->comp('/Elements/QueryString',
Query => $Query,
Format => $Format,
@@ -86,7 +91,7 @@ $Title => loc("Most due incidents")
$BaseQuery => RT::IR->Query( Queue => 'Incidents' )
$Query => RT::IR->ActiveQuery( Queue => 'Incidents' )
$Format => RT->Config->Get('RTIRSearchResultFormats')->{'DueIncidents'}
-$Rows => RT->Config->Get('DefaultSummaryRows', $session{'CurrentUser'})
+$Rows => undef
$Page => 1
$OrderBy => 'Due'
$Order => 'ASC'
diff --git a/html/RTIR/Elements/NewReports b/html/RTIR/Elements/NewReports
index ae907a9..b9de951 100644
--- a/html/RTIR/Elements/NewReports
+++ b/html/RTIR/Elements/NewReports
@@ -73,6 +73,11 @@ my $title = loc("New unlinked Incident Reports...");
$Query ||= RT::IR->Query( Queue => $Queue, Initial => 1 );
+$Rows = $session{'CurrentUser'}->UserObj->Preferences(
+ 'SummaryRows',
+ ( RT->Config->Get('DefaultSummaryRows') || 10 ),
+) unless defined $Rows;
+
my $QueryString = $m->comp('/Elements/QueryString',
Queue => $Queue,
Query => $Query,
@@ -97,7 +102,7 @@ $Queue => 'Incident Reports'
$BaseQuery => RT::IR->Query( Queue => $Queue )
$Query => undef
$Format => RT->Config->Get('RTIRSearchResultFormats')->{'NewReports'}
-$Rows => RT->Config->Get('DefaultSummaryRows', $session{'CurrentUser'})
+$Rows => undef
$Page => 1
$OrderBy => 'Due'
$Order => 'ASC'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list