[Rt-commit] rt branch, 4.4/unset-rows-per-page, created. rt-4.4.4-127-gdb2e115a77
? sunnavy
sunnavy at bestpractical.com
Tue Aug 4 18:35:32 EDT 2020
The branch, 4.4/unset-rows-per-page has been created
at db2e115a77bb596bd2a5801cd2ad941b82ebd927 (commit)
- Log -----------------------------------------------------------------
commit db2e115a77bb596bd2a5801cd2ad941b82ebd927
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Aug 5 05:59:25 2020 +0800
Don't set RowsPerPage if we can't find the pre-defined value
This is to fix the saved chart loading issue where RowsPerPage could be
incorrectly set to empty string, which means "Unlimited":
1) Create a search
2) Click on chart and save the chart
3) Reload the chart
4) Click on Show Results or look at the link and RowsPerPage has no value
For searches, saved charts only care about query and don't save other
search info like Format, RowsPerPage, OrderBy, etc. Thus when loading
saved charts, there is no RowsPerPage defined.
As RowsPerPage falls back to the default value in user preference when
it's absent, it's totally ok to not explicitly set it.
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index f6233c33fa..0407ecc2b7 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -922,13 +922,12 @@ my $build_main_nav = sub {
$p => $DECODED_ARGS->{$p} || $current_search->{$p}
} qw(Query Format OrderBy Order Page)
),
- RowsPerPage => (
- defined $DECODED_ARGS->{'RowsPerPage'}
- ? $DECODED_ARGS->{'RowsPerPage'}
- : $current_search->{'RowsPerPage'}
- ),
);
+ if ( defined ( my $rows = $DECODED_ARGS->{'RowsPerPage'} // $current_search->{'RowsPerPage'} ) ) {
+ $fallback_query_args{RowsPerPage} = $rows;
+ }
+
if ($QueryString) {
$args = '?' . $QueryString;
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list