1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 17:00:59 +01:00

Fix an issue where subpriority paging could be truncated

Ref T7548. Subpriority is a float, but we're truncating it to an int, which can cause reselection of the same row while paging.
This commit is contained in:
epriestley 2015-03-14 13:42:06 -07:00
parent 77e0a4abba
commit 106ca70acb
2 changed files with 5 additions and 2 deletions

View file

@ -1066,8 +1066,8 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
} }
$columns[] = array( $columns[] = array(
'name' => 'task.subpriority', 'name' => 'task.subpriority',
'value' => (int)$cursor->getSubpriority(), 'value' => $cursor->getSubpriority(),
'type' => 'int', 'type' => 'float',
'reverse' => true, 'reverse' => true,
); );
$columns[] = array( $columns[] = array(

View file

@ -252,6 +252,9 @@ abstract class PhabricatorCursorPagedPolicyAwareQuery
case 'int': case 'int':
$value = qsprintf($conn, '%d', $column['value']); $value = qsprintf($conn, '%d', $column['value']);
break; break;
case 'float':
$value = qsprintf($conn, '%f', $column['value']);
break;
case 'string': case 'string':
$value = qsprintf($conn, '%s', $column['value']); $value = qsprintf($conn, '%s', $column['value']);
break; break;