Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15197386
D20339.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20339.diff
View Options
diff --git a/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php b/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php
--- a/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php
+++ b/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php
@@ -64,9 +64,27 @@
public function validateTransactions($object, array $xactions) {
$errors = array();
- if ($this->isEmptyTextTransaction($object->getTitle(), $xactions)) {
- $errors[] = $this->newRequiredError(
- pht('Tasks must have a title.'));
+ // If the user is acting via "Bulk Edit" or another workflow which
+ // continues on missing fields, they may be applying a transaction which
+ // removes the task title. Mark these transactions as invalid first,
+ // then flag the missing field error if we don't find any more specific
+ // problems.
+
+ foreach ($xactions as $xaction) {
+ $new = $xaction->getNewValue();
+ if (!strlen($new)) {
+ $errors[] = $this->newInvalidError(
+ pht('Tasks must have a title.'),
+ $xaction);
+ continue;
+ }
+ }
+
+ if (!$errors) {
+ if ($this->isEmptyTextTransaction($object->getTitle(), $xactions)) {
+ $errors[] = $this->newRequiredError(
+ pht('Tasks must have a title.'));
+ }
}
return $errors;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 11:02 PM (13 h, 21 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7187983
Default Alt Text
D20339.diff (1 KB)
Attached To
Mode
D20339: Prevent users from removing task titles with "Bulk Edit"
Attached
Detach File
Event Timeline
Log In to Comment