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

BPS Git Server git at git.bestpractical.com
Sun Mar 10 22:35:14 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  acf8724becd39f773e86741654fdd5744b64a675 (commit)

- Log -----------------------------------------------------------------
commit acf8724becd39f773e86741654fdd5744b64a675
Author: Brad Embree <brad at bestpractical.com>
Date:   Sun Mar 10 15:32:22 2024 -0700

    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 4d99cd3d90..4cb425fcf6 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