diff --git a/resources/sql/patches/086.formeraffil.sql b/resources/sql/patches/086.formeraffil.sql
new file mode 100644
index 0000000000..6b73157e24
--- /dev/null
+++ b/resources/sql/patches/086.formeraffil.sql
@@ -0,0 +1 @@
+ALTER TABLE phabricator_project.project_affiliation DROP status;
\ No newline at end of file
diff --git a/src/applications/project/controller/editaffiliation/PhabricatorProjectAffiliationEditController.php b/src/applications/project/controller/editaffiliation/PhabricatorProjectAffiliationEditController.php
index 9c53b63e35..59aa068c11 100644
--- a/src/applications/project/controller/editaffiliation/PhabricatorProjectAffiliationEditController.php
+++ b/src/applications/project/controller/editaffiliation/PhabricatorProjectAffiliationEditController.php
@@ -48,7 +48,6 @@ class PhabricatorProjectAffiliationEditController
if ($request->isFormPost()) {
$affiliation->setRole($request->getStr('role'));
- $affiliation->setStatus($request->getStr('status'));
if (!strlen($affiliation->getRole())) {
if ($affiliation->getID()) {
@@ -67,11 +66,6 @@ class PhabricatorProjectAffiliationEditController
->setURI('/project/view/'.$project->getID().'/');
}
- $status_options = array(
- '' => 'Current',
- 'former' => 'Former',
- );
-
$form = new AphrontFormView();
$form
->setUser($user)
@@ -81,12 +75,6 @@ class PhabricatorProjectAffiliationEditController
->setLabel('Role')
->setName('role')
->setValue($affiliation->getRole()))
- ->appendChild(
- id(new AphrontFormSelectControl())
- ->setLabel('Status')
- ->setName('status')
- ->setOptions($status_options)
- ->setValue($affiliation->getStatus()))
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton('/project/view/'.$project->getID().'/')
diff --git a/src/applications/project/controller/editaffiliation/__init__.php b/src/applications/project/controller/editaffiliation/__init__.php
index 8851946da8..a7f2f16f56 100644
--- a/src/applications/project/controller/editaffiliation/__init__.php
+++ b/src/applications/project/controller/editaffiliation/__init__.php
@@ -12,7 +12,6 @@ phutil_require_module('phabricator', 'applications/project/controller/base');
phutil_require_module('phabricator', 'applications/project/storage/affiliation');
phutil_require_module('phabricator', 'applications/project/storage/project');
phutil_require_module('phabricator', 'view/form/base');
-phutil_require_module('phabricator', 'view/form/control/select');
phutil_require_module('phabricator', 'view/form/control/submit');
phutil_require_module('phabricator', 'view/form/control/text');
phutil_require_module('phabricator', 'view/layout/panel');
diff --git a/src/applications/project/controller/profile/PhabricatorProjectProfileController.php b/src/applications/project/controller/profile/PhabricatorProjectProfileController.php
index 26d58687fe..7f70750460 100644
--- a/src/applications/project/controller/profile/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/profile/PhabricatorProjectProfileController.php
@@ -132,13 +132,7 @@ class PhabricatorProjectProfileController
foreach ($affiliations as $affiliation) {
$user = $handles[$affiliation->getUserPHID()]->renderLink();
$role = phutil_escape_html($affiliation->getRole());
-
- $status = null;
- if ($affiliation->getStatus() == 'former') {
- $role = 'Former '.$role.'';
- }
-
- $affiliated[] = '
'.$user.' — '.$role.$status.'';
+ $affiliated[] = ''.$user.' — '.$role.'';
}
if ($affiliated) {
diff --git a/src/applications/project/controller/profileedit/PhabricatorProjectProfileEditController.php b/src/applications/project/controller/profileedit/PhabricatorProjectProfileEditController.php
index db0514a5fb..07f5c058a5 100644
--- a/src/applications/project/controller/profileedit/PhabricatorProjectProfileEditController.php
+++ b/src/applications/project/controller/profileedit/PhabricatorProjectProfileEditController.php
@@ -113,7 +113,6 @@ class PhabricatorProjectProfileEditController
}
$state[$user_phid] = array(
'phid' => $user_phid,
- 'status' => $resource['status'],
'role' => $resource['role'],
'owner' => $resource['owner'],
);
@@ -141,7 +140,6 @@ class PhabricatorProjectProfileEditController
}
$affil->setRole((string)$new['role']);
- $affil->setStatus((string)$new['status']);
$affil->setIsOwner((int)$new['owner']);
$save_affiliations[] = $affil;
@@ -180,7 +178,6 @@ class PhabricatorProjectProfileEditController
$state[] = array(
'phid' => $user_phid,
'name' => $handles[$user_phid]->getFullName(),
- 'status' => $affil->getStatus(),
'role' => $affil->getRole(),
'owner' => $affil->getIsOwner(),
);
diff --git a/src/applications/project/query/project/PhabricatorProjectQuery.php b/src/applications/project/query/project/PhabricatorProjectQuery.php
index cd49a2426e..2f25ccf7da 100644
--- a/src/applications/project/query/project/PhabricatorProjectQuery.php
+++ b/src/applications/project/query/project/PhabricatorProjectQuery.php
@@ -67,7 +67,7 @@ final class PhabricatorProjectQuery {
$data = queryfx_all(
$conn_r,
- 'SELECT * FROM %T p %Q %Q',
+ 'SELECT p.* FROM %T p %Q %Q',
$table->getTableName(),
$joins,
$limit);
diff --git a/src/applications/project/storage/affiliation/PhabricatorProjectAffiliation.php b/src/applications/project/storage/affiliation/PhabricatorProjectAffiliation.php
index 7dc819792b..a059682bbe 100644
--- a/src/applications/project/storage/affiliation/PhabricatorProjectAffiliation.php
+++ b/src/applications/project/storage/affiliation/PhabricatorProjectAffiliation.php
@@ -21,7 +21,6 @@ class PhabricatorProjectAffiliation extends PhabricatorProjectDAO {
protected $projectPHID;
protected $userPHID;
protected $role;
- protected $status = '';
protected $isOwner = 0;
public static function loadAllForProjectPHIDs($phids) {
@@ -31,7 +30,7 @@ class PhabricatorProjectAffiliation extends PhabricatorProjectDAO {
$default = array_fill_keys($phids, array());
$affiliations = id(new PhabricatorProjectAffiliation())->loadAllWhere(
- 'projectPHID IN (%Ls) ORDER BY IF(status = "former", 1, 0), dateCreated',
+ 'projectPHID IN (%Ls) ORDER BY dateCreated',
$phids);
return mgroup($affiliations, 'getProjectPHID') + $default;
diff --git a/webroot/rsrc/js/application/projects/projects-resource-editor.js b/webroot/rsrc/js/application/projects/projects-resource-editor.js
index 9a7e7d7611..31626b8cbc 100644
--- a/webroot/rsrc/js/application/projects/projects-resource-editor.js
+++ b/webroot/rsrc/js/application/projects/projects-resource-editor.js
@@ -40,10 +40,6 @@ JX.behavior('projects-resource-editor', function(config) {
tokenizer.addToken(data.phid, data.name);
}
- var status = JX.Prefab.renderSelect(
- {'' : 'Current', 'former' : 'Former'},
- data.status || '');
-
var role = JX.$N('input', {type: 'text', value : data.role || ''});
var ownership = JX.Prefab.renderSelect(
@@ -54,7 +50,6 @@ JX.behavior('projects-resource-editor', function(config) {
var tokens = tokenizer.getTokens();
return {
phid : JX.keys(tokens)[0] || null,
- status : status.value,
role : role.value,
owner : ownership.value
};
@@ -64,7 +59,6 @@ JX.behavior('projects-resource-editor', function(config) {
r.push([null, JX.$N('label', {}, 'User:')]);
r.push(['user-tokenizer', template]);
r.push(['role-label', JX.$N('label', {}, 'Role:')]);
- r.push([null, status]);
r.push(['role', role]);
r.push([null, ownership]);