Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2694785
D25550.1734802654.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
D25550.1734802654.diff
View Options
diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
--- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php
+++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
@@ -327,11 +327,11 @@
$is_unassigned = ($object->getOwnerPHID() === null);
- $any_assign = false;
+ $any_xassign = null;
foreach ($xactions as $xaction) {
if ($xaction->getTransactionType() ==
ManiphestTaskOwnerTransaction::TRANSACTIONTYPE) {
- $any_assign = true;
+ $any_xassign = $xaction;
break;
}
}
@@ -355,15 +355,22 @@
// If the task is not assigned, not being assigned, currently open, and
// being closed, try to assign the actor as the owner.
- 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 claim the task if the status is configured to not claim.
- if ($actor_phid && $is_claim) {
- $results[] = id(new ManiphestTransaction())
- ->setTransactionType(ManiphestTaskOwnerTransaction::TRANSACTIONTYPE)
- ->setNewValue($actor_phid);
+ // Don't assign the actor if they aren't a real user.
+ if ($is_unassigned && $is_open && $is_closing && $actor_phid) {
+ $is_autoclaim = ManiphestTaskStatus::isClaimStatus($new_status);
+ if ($is_autoclaim) {
+ if ($any_xassign === null) {
+ $results[] = id(new ManiphestTransaction())
+ ->setTransactionType(ManiphestTaskOwnerTransaction::TRANSACTIONTYPE)
+ ->setNewValue($actor_phid);
+ } else if ($any_xassign->getNewValue() === null) {
+ // We have an explicit "Assign / Claim" = nothing in the frontend.
+ // The user is trying to "undo" the above automatic auto-claim.
+ // When saving, this would cause the "no effect" warning.
+ // So we suppress that confusing warning.
+ // https://we.phorge.it/T15164
+ $any_xassign->setIgnoreOnNoEffect(true);
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 17:37 (15 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1024714
Default Alt Text
D25550.1734802654.diff (2 KB)
Attached To
Mode
D25550: Avoid "Action with no effect" for auto-claim statuses after manually removing assignee
Attached
Detach File
Event Timeline
Log In to Comment