Skip to content

Commit 383882c

Browse files
committed
Make "Jump to Unread" links work with scrolled history
Previously, clicking "Jump to Unread" would have no effect if the history was already visible but lacked the unread transaction. Technically, the lastTransactionId is always inferred from the existing transaction list, so resetting it is unnecessary.
1 parent 26cdd23 commit 383882c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

share/html/Elements/ShowHistoryHeader

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ jQuery(function(){
318318
loadAll = false;
319319

320320
// check for link to specific transaction and make sure we load enough to focus it
321-
if (hash && !lastTransactionId) {
321+
if (hash) {
322322
var matches = hash.match(/^#txn-(\d+)$/);
323323
if (matches) {
324324
hashTransactionId = matches[1];
@@ -406,7 +406,6 @@ jQuery(function(){
406406
var link = jQuery(this);
407407
if ( link[0].hash ) {
408408
hash = link[0].hash;
409-
lastTransactionId = null;
410409
loadHistoryPage();
411410
}
412411
return true;

share/html/Helpers/TicketHistoryPage

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ if ($ShowPagination && defined $Page) {
166166
$transactions->Limit(
167167
FIELD => 'id',
168168
OPERATOR => $oldestTransactionsFirst ? '<=' : '>=',
169-
VALUE => $focusTransactionId
169+
VALUE => $focusTransactionId,
170+
ENTRYAGGREGATOR => 'AND',
170171
);
171172
} elsif (!$loadAll) { # otherwise, just load the standard page of 10 transactions
172173
$transactions->RowsPerPage(10);

0 commit comments

Comments
 (0)