[Rt-commit] rt branch 5.0/allow-self-service-reverse-txn-history created. rt-5.0.5-211-gd79a2f0017

BPS Git Server git at git.bestpractical.com
Sat Mar 9 23:21:23 UTC 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/allow-self-service-reverse-txn-history has been created
        at  d79a2f0017acd6ae72138ab37d2a9127ba57cba3 (commit)

- Log -----------------------------------------------------------------
commit d79a2f0017acd6ae72138ab37d2a9127ba57cba3
Author: Brad Embree <brad at bestpractical.com>
Date:   Sat Mar 9 14:36:49 2024 -0800

    Check DECODED_ARGS for ReverseTxns URL parameter
    
    Various pages that show the reverse history order option do not actually
    respect the ReverseTxns parameter when passed in.
    
    Updating ShowHistoryHeader and ShowHistoryPage to check for ReverseTxns
    in DECODED_ARGS fixes these pages without having to fix them all
    indvididually.

diff --git a/share/html/Elements/ShowHistoryHeader b/share/html/Elements/ShowHistoryHeader
index fff3fb3c03..f073df37ef 100644
--- a/share/html/Elements/ShowHistoryHeader
+++ b/share/html/Elements/ShowHistoryHeader
@@ -58,7 +58,7 @@ $Title             => loc('History')
 my $record_type = $Object->RecordType;
 my $histid      = "\L$record_type\E-" . $Object->id . "-history";
 
-my $reverse_txns = $ARGS{'ReverseTxns'};
+my $reverse_txns = $ARGS{'ReverseTxns'} || $DECODED_ARGS->{ReverseTxns};
 if ( $reverse_txns ) {
     # If we got something, reverse it for the link
     $reverse_txns = $reverse_txns eq 'ASC' ? 'DESC' : 'ASC';
diff --git a/share/html/Elements/ShowHistoryPage b/share/html/Elements/ShowHistoryPage
index f6aa296e87..37c2f0ef1f 100644
--- a/share/html/Elements/ShowHistoryPage
+++ b/share/html/Elements/ShowHistoryPage
@@ -59,6 +59,7 @@ $PathPrefix        => ''
 my $trans_content = {};
 my $trans_attachments = {};
 
+$ARGS{'ReverseTxns'} ||= $DECODED_ARGS->{ReverseTxns};
 if ( $ARGS{'ReverseTxns'} ) {
     $Transactions = $Object->SortedTransactions($ARGS{'ReverseTxns'});
 }

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list