Store metadata with Differential and Maniphest comments, and store added
reviewers as metadata Summary: The "Add reviewer" implementation is super lazy right now since I didn't want to do a schema change. Man up and add a column. I also plan to store "via" information here (e.g., via email or via mobile). NOTE: This schema change may take a while since the comment table is pretty big in Facebook's install. This needs a little CSS work but I think it's reasonable for now. Test Plan: Made comments on revisions and tasks. Added reviewers to a revision, got linked names instead of a blob of text. Reviewed By: aran Reviewers: tomo, jungejason, tuomaspelkonen, aran Commenters: tomo CC: aran, tomo, epriestley Differential Revision: 394
This commit is contained in:
@@ -78,6 +78,19 @@ class DifferentialRevisionViewController extends DifferentialController {
|
||||
$user->getPHID(),
|
||||
),
|
||||
mpull($comments, 'getAuthorPHID'));
|
||||
|
||||
foreach ($comments as $comment) {
|
||||
$metadata = $comment->getMetadata();
|
||||
$added_reviewers = idx(
|
||||
$metadata,
|
||||
DifferentialComment::METADATA_ADDED_REVIEWERS);
|
||||
if ($added_reviewers) {
|
||||
foreach ($added_reviewers as $phid) {
|
||||
$object_phids[] = $phid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($revision->getAttached() as $type => $phids) {
|
||||
foreach ($phids as $phid => $info) {
|
||||
$object_phids[] = $phid;
|
||||
|
||||
Reference in New Issue
Block a user