Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/editor/ManiphestTransactionEditor.php
Show First 20 Lines • Show All 965 Lines • ▼ Show 20 Lines | if ($new_status === null) { | ||||
$is_closing = false; | $is_closing = false; | ||||
} else { | } else { | ||||
$is_closing = ManiphestTaskStatus::isClosedStatus($new_status); | $is_closing = ManiphestTaskStatus::isClosedStatus($new_status); | ||||
} | } | ||||
// If the task is not assigned, not being assigned, currently open, and | // If the task is not assigned, not being assigned, currently open, and | ||||
// being closed, try to assign the actor as the owner. | // being closed, try to assign the actor as the owner. | ||||
if ($is_unassigned && !$any_assign && $is_open && $is_closing) { | if ($is_unassigned && !$any_assign && $is_open && $is_closing) { | ||||
$is_claim = ManiphestTaskStatus::isClaimStatus($new_status); | |||||
// Don't assign the actor if they aren't a real user. | // Don't assign the actor if they aren't a real user. | ||||
if ($actor_phid) { | // Don't claim the task if the status is configured to not claim. | ||||
if ($actor_phid && $is_claim) { | |||||
$results[] = id(new ManiphestTransaction()) | $results[] = id(new ManiphestTransaction()) | ||||
->setTransactionType(ManiphestTransaction::TYPE_OWNER) | ->setTransactionType(ManiphestTransaction::TYPE_OWNER) | ||||
->setNewValue($actor_phid); | ->setNewValue($actor_phid); | ||||
} | } | ||||
} | } | ||||
// Automatically subscribe the author when they create a task. | // Automatically subscribe the author when they create a task. | ||||
if ($this->getIsNewObject()) { | if ($this->getIsNewObject()) { | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |