mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
When authors add inlines to their own revisions/commits, mark them as "Done" by default
Summary: Ref T13195. Fixes T8573. When you're adding inlines to your own stuff, mark them "Done" by default. You can unmark them as "Done" if you're legitimately leaving TODOs for yourself, although I think this is unusual. (If this turns out to be less unusual than I think, we could consider an alternate rule: mark replies by the author as "Done" by default.) Test Plan: Added some inlines as an author and a non-author. Saw my author inlines marked as "Done" by default. Submitted them; unmarked and submittted them. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13195, T8573 Differential Revision: https://secure.phabricator.com/D19635
This commit is contained in:
parent
16a6fc8341
commit
2a03367a50
1 changed files with 9 additions and 0 deletions
|
@ -231,6 +231,15 @@ abstract class PhabricatorInlineCommentController
|
|||
$inline->setReplyToCommentPHID($this->getReplyToCommentPHID());
|
||||
}
|
||||
|
||||
// If you own this object, mark your own inlines as "Done" by default.
|
||||
$owner_phid = $this->loadObjectOwnerPHID($inline);
|
||||
if ($owner_phid) {
|
||||
if ($viewer->getPHID() == $owner_phid) {
|
||||
$fixed_state = PhabricatorInlineCommentInterface::STATE_DRAFT;
|
||||
$inline->setFixedState($fixed_state);
|
||||
}
|
||||
}
|
||||
|
||||
$this->saveComment($inline);
|
||||
|
||||
return $this->buildRenderedCommentResponse(
|
||||
|
|
Loading…
Reference in a new issue