[Bps-public-commit] rt-extension-assetsql branch, master, updated. 6ab3b20f89046c974ca776878108fa64fe73cb62

Shawn Moore shawn at bestpractical.com
Wed Jun 15 15:01:51 EDT 2016


The branch, master has been updated
       via  6ab3b20f89046c974ca776878108fa64fe73cb62 (commit)
      from  85535f3fdb0fc3d4352dea9fb5d1cb12d008cff7 (commit)

Summary of changes:
 patches/rt-4.4.0-4.4.1.patch | 60 +++++++++++++++++++++++++++++++++++---------
 1 file changed, 48 insertions(+), 12 deletions(-)

- Log -----------------------------------------------------------------
commit 6ab3b20f89046c974ca776878108fa64fe73cb62
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Jun 15 19:01:35 2016 +0000

    Regenerate patch to 4.4.0/4.4.1
    
        This incorporates 4.4/dashboard-sorting

diff --git a/patches/rt-4.4.0-4.4.1.patch b/patches/rt-4.4.0-4.4.1.patch
index ad9c98f..abc33ee 100644
--- a/patches/rt-4.4.0-4.4.1.patch
+++ b/patches/rt-4.4.0-4.4.1.patch
@@ -1,3 +1,39 @@
+diff --git a/share/html/Elements/CollectionList b/share/html/Elements/CollectionList
+index 5325b2e..fd8c6e6 100644
+--- a/share/html/Elements/CollectionList
++++ b/share/html/Elements/CollectionList
+@@ -70,7 +70,7 @@ if ( $Rows ) {
+ 
+ # XXX: ->{'order_by'} is hacky, but there is no way to check if
+ # collection is ordered or not
+-if ( @OrderBy && ($AllowSorting || !$Collection->{'order_by'}) ) {
++if ( @OrderBy && ($AllowSorting || $PreferOrderBy || !$Collection->{'order_by'}) ) {
+     if ( $OrderBy[0] =~ /\|/ ) {
+         @OrderBy = split /\|/, $OrderBy[0];
+         @Order = split /\|/,$Order[0];
+@@ -203,7 +203,8 @@ $Title         => loc('Ticket Search')
+ $BaseURL       => RT->Config->Get('WebPath') . $m->request_comp->path .'?'
+ @PassArguments => qw( Query Format Rows Page Order OrderBy)
+ 
+-$AllowSorting   => 0
++$AllowSorting   => 0  # Make headers in table links that will resort results
++$PreferOrderBy  => 0  # Prefer the passed-in @OrderBy to the collection default
+ $ShowNavigation => 1
+ $ShowHeader     => 1
+ $ShowEmpty      => 0
+diff --git a/share/html/Elements/ShowSearch b/share/html/Elements/ShowSearch
+index c154bca..1483b4a 100644
+--- a/share/html/Elements/ShowSearch
++++ b/share/html/Elements/ShowSearch
+@@ -51,7 +51,7 @@
+     titleright => $customize ? loc('Edit') : '',
+     titleright_href => $customize,
+     hideable => $hideable &>
+-<& $query_display_component, hideable => $hideable, %$ProcessedSearchArg, ShowNavigation => 0, Class => 'RT::Tickets', HasResults => $HasResults &>
++<& $query_display_component, hideable => $hideable, %$ProcessedSearchArg, ShowNavigation => 0, Class => 'RT::Tickets', HasResults => $HasResults, PreferOrderBy => 1 &>
+ </&>
+ <%init>
+ my $search;
 diff --git a/lib/RT/Assets.pm b/lib/RT/Assets.pm
 index b52308a..e05a7ae 100644
 --- a/lib/RT/Assets.pm
@@ -86,6 +122,18 @@ index ef3e826..99717da 100644
  $CatalogObj => undef
 +%Catalogs => ()
  </%args>
+diff --git a/share/html/Asset/Search/index.html b/share/html/Asset/Search/index.html
+index f1ebfa5..903ceb4 100644
+--- a/share/html/Asset/Search/index.html
++++ b/share/html/Asset/Search/index.html
+@@ -58,6 +58,7 @@ my $title = ( $ARGS{'SearchAssets'} or $ARGS{q} ) ?
+       loc("Found [quant,_1,asset,assets]",$assets->Count)
+     : loc("Assets");
+ 
++$m->callback( CallbackName => 'Initial', Assets => $assets, ARGSRef => \%ARGS);
+ </%init>
+ <& /Elements/Header, Title => $title &>
+ <& /Elements/Tabs &>
 diff --git a/share/html/Elements/SelectStatus b/share/html/Elements/SelectStatus
 index 7eb678d..3183a90 100644
 --- a/share/html/Elements/SelectStatus
@@ -121,15 +169,3 @@ index f4ac8a9..e672e3b 100644
  };
  
  
-diff --git a/share/html/Asset/Search/index.html b/share/html/Asset/Search/index.html
-index f1ebfa5..903ceb4 100644
---- a/share/html/Asset/Search/index.html
-+++ b/share/html/Asset/Search/index.html
-@@ -58,6 +58,7 @@ my $title = ( $ARGS{'SearchAssets'} or $ARGS{q} ) ?
-       loc("Found [quant,_1,asset,assets]",$assets->Count)
-     : loc("Assets");
- 
-+$m->callback( CallbackName => 'Initial', Assets => $assets, ARGSRef => \%ARGS);
- </%init>
- <& /Elements/Header, Title => $title &>
- <& /Elements/Tabs &>

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list