mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 17:22:42 +01:00
Fix ambiguous column names in Maniphest blocking queries
Summary: Fixes T7421. Now that we join the task table again to ignore //closed// blockers, all the column names are ambiguous. Make them unambiguous. Test Plan: Issued some searches with various different parameters. Reviewers: btrahan, joshuaspence, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T7421 Differential Revision: https://secure.phabricator.com/D11922
This commit is contained in:
parent
18340d9cef
commit
bb6eb9bfcf
1 changed files with 26 additions and 26 deletions
|
@ -438,7 +438,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
|
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'id in (%Ld)',
|
'task.id in (%Ld)',
|
||||||
$this->taskIDs);
|
$this->taskIDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
|
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'phid in (%Ls)',
|
'task.phid in (%Ls)',
|
||||||
$this->taskPHIDs);
|
$this->taskPHIDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,12 +468,12 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
case self::STATUS_OPEN:
|
case self::STATUS_OPEN:
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'status IN (%Ls)',
|
'task.status IN (%Ls)',
|
||||||
ManiphestTaskStatus::getOpenStatusConstants());
|
ManiphestTaskStatus::getOpenStatusConstants());
|
||||||
case self::STATUS_CLOSED:
|
case self::STATUS_CLOSED:
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'status IN (%Ls)',
|
'task.status IN (%Ls)',
|
||||||
ManiphestTaskStatus::getClosedStatusConstants());
|
ManiphestTaskStatus::getClosedStatusConstants());
|
||||||
default:
|
default:
|
||||||
$constant = idx($map, $this->status);
|
$constant = idx($map, $this->status);
|
||||||
|
@ -482,7 +482,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
}
|
}
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'status = %s',
|
'task.status = %s',
|
||||||
$constant);
|
$constant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,7 +491,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
if ($this->statuses) {
|
if ($this->statuses) {
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'status IN (%Ls)',
|
'task.status IN (%Ls)',
|
||||||
$this->statuses);
|
$this->statuses);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -501,7 +501,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
if ($this->priorities) {
|
if ($this->priorities) {
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'priority IN (%Ld)',
|
'task.priority IN (%Ld)',
|
||||||
$this->priorities);
|
$this->priorities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
|
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'authorPHID in (%Ls)',
|
'task.authorPHID in (%Ls)',
|
||||||
$this->authorPHIDs);
|
$this->authorPHIDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,23 +526,23 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
} else if ($this->includeUnowned) {
|
} else if ($this->includeUnowned) {
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'ownerPHID IS NULL');
|
'task.ownerPHID IS NULL');
|
||||||
} else {
|
} else {
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'ownerPHID IS NOT NULL');
|
'task.ownerPHID IS NOT NULL');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->includeUnowned) {
|
if ($this->includeUnowned) {
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'ownerPHID IN (%Ls) OR ownerPHID IS NULL',
|
'task.ownerPHID IN (%Ls) OR task.ownerPHID IS NULL',
|
||||||
$this->ownerPHIDs);
|
$this->ownerPHIDs);
|
||||||
} else {
|
} else {
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'ownerPHID IN (%Ls)',
|
'task.ownerPHID IN (%Ls)',
|
||||||
$this->ownerPHIDs);
|
$this->ownerPHIDs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -572,7 +572,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
|
|
||||||
return qsprintf(
|
return qsprintf(
|
||||||
$conn,
|
$conn,
|
||||||
'phid IN (%Ls)',
|
'task.phid IN (%Ls)',
|
||||||
$fulltext_results);
|
$fulltext_results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -680,13 +680,13 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
case self::GROUP_NONE:
|
case self::GROUP_NONE:
|
||||||
break;
|
break;
|
||||||
case self::GROUP_PRIORITY:
|
case self::GROUP_PRIORITY:
|
||||||
$order[] = 'priority';
|
$order[] = 'task.priority';
|
||||||
break;
|
break;
|
||||||
case self::GROUP_OWNER:
|
case self::GROUP_OWNER:
|
||||||
$order[] = 'ownerOrdering';
|
$order[] = 'task.ownerOrdering';
|
||||||
break;
|
break;
|
||||||
case self::GROUP_STATUS:
|
case self::GROUP_STATUS:
|
||||||
$order[] = 'status';
|
$order[] = 'task.status';
|
||||||
break;
|
break;
|
||||||
case self::GROUP_PROJECT:
|
case self::GROUP_PROJECT:
|
||||||
$order[] = '<group.project>';
|
$order[] = '<group.project>';
|
||||||
|
@ -700,18 +700,18 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
if (!$app_order) {
|
if (!$app_order) {
|
||||||
switch ($this->orderBy) {
|
switch ($this->orderBy) {
|
||||||
case self::ORDER_PRIORITY:
|
case self::ORDER_PRIORITY:
|
||||||
$order[] = 'priority';
|
$order[] = 'task.priority';
|
||||||
$order[] = 'subpriority';
|
$order[] = 'task.subpriority';
|
||||||
$order[] = 'dateModified';
|
$order[] = 'task.dateModified';
|
||||||
break;
|
break;
|
||||||
case self::ORDER_CREATED:
|
case self::ORDER_CREATED:
|
||||||
$order[] = 'id';
|
$order[] = 'task.id';
|
||||||
break;
|
break;
|
||||||
case self::ORDER_MODIFIED:
|
case self::ORDER_MODIFIED:
|
||||||
$order[] = 'dateModified';
|
$order[] = 'task.dateModified';
|
||||||
break;
|
break;
|
||||||
case self::ORDER_TITLE:
|
case self::ORDER_TITLE:
|
||||||
$order[] = 'title';
|
$order[] = 'task.title';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unknown order query '{$this->orderBy}'!");
|
throw new Exception("Unknown order query '{$this->orderBy}'!");
|
||||||
|
@ -730,9 +730,9 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
case 'ownerOrdering':
|
case 'ownerOrdering':
|
||||||
case 'title':
|
case 'title':
|
||||||
if ($reverse) {
|
if ($reverse) {
|
||||||
$order[$k] = "task.{$column} DESC";
|
$order[$k] = "{$column} DESC";
|
||||||
} else {
|
} else {
|
||||||
$order[$k] = "task.{$column} ASC";
|
$order[$k] = "{$column} ASC";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '<group.project>':
|
case '<group.project>':
|
||||||
|
@ -749,9 +749,9 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if ($reverse) {
|
if ($reverse) {
|
||||||
$order[$k] = "task.{$column} ASC";
|
$order[$k] = "{$column} ASC";
|
||||||
} else {
|
} else {
|
||||||
$order[$k] = "task.{$column} DESC";
|
$order[$k] = "{$column} DESC";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue