mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +01:00
Transactions - fix pagination bug
Summary: Fixes T6694. Ref T4712. Turns out the logic here was slightly incorrect; we don't want to use the id of the last thing we hid but rather the first thing we show. I had garbage test data ("asdsadsadsa", etc) I guess so I didn't notice this. Test Plan: made a new task where user a and user b alternated 3 comments each, cooperatively numbering them from 1 - 20. as both users, showed older transactions. pre-patch the issue described in T6694 occurred and post patch I saw the entire counting sequence. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T4712, T6694 Differential Revision: https://secure.phabricator.com/D10933
This commit is contained in:
parent
2856c60932
commit
a1a8083b93
1 changed files with 4 additions and 1 deletions
|
@ -144,10 +144,12 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
||||||
|
|
||||||
$events = array();
|
$events = array();
|
||||||
$hide_by_default = ($show_group !== null);
|
$hide_by_default = ($show_group !== null);
|
||||||
|
$set_next_page_id = false;
|
||||||
|
|
||||||
foreach ($groups as $group_key => $group) {
|
foreach ($groups as $group_key => $group) {
|
||||||
if ($hide_by_default && ($show_group === $group_key)) {
|
if ($hide_by_default && ($show_group === $group_key)) {
|
||||||
$hide_by_default = false;
|
$hide_by_default = false;
|
||||||
|
$set_next_page_id = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$group_event = null;
|
$group_event = null;
|
||||||
|
@ -159,7 +161,8 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
||||||
} else {
|
} else {
|
||||||
$group_event->addEventToGroup($event);
|
$group_event->addEventToGroup($event);
|
||||||
}
|
}
|
||||||
if ($hide_by_default) {
|
if ($set_next_page_id) {
|
||||||
|
$set_next_page_id = false;
|
||||||
$pager = $this->getPager();
|
$pager = $this->getPager();
|
||||||
if ($pager) {
|
if ($pager) {
|
||||||
$pager->setNextPageID($xaction->getID());
|
$pager->setNextPageID($xaction->getID());
|
||||||
|
|
Loading…
Reference in a new issue