Page MenuHomePhorge

[Regression] Incorrect mail subject header [Updated] instead of [Created]
Closed, ResolvedPublic

Description

After creating T15864, I received a notification email whose subject line is
[Maniphest] [Updated] T15864: PHP 8.1 "strlen(null)" exceptions in PhabricatorEditEngine handling empty comment data in AphrontRequest.
The first line in the email body correctly says aklapper created this task.

This is a regression: It should have said [Created] instead of [Updated].

This had worked correctly in the past, on 2026-06-19,
[Maniphest] [Created] T15860: Editing a Herald rule fails to display values of custom field: "Unknown Object (????)"
was still correct.

The only recent change coming to my mind is rPf4d9d6920bcdcafedd6a05f34c28642589b3c285, might be unrelated...

Event Timeline

In https://we.phorge.it/source/phorge/browse/master/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php ,
getMailAction() does return $this->getStrongestAction($object, $xactions)->getActionName()
and
getStrongestAction() does return head(msortv($xactions, 'newActionStrengthSortVector'))
and
newActionStrengthSortVector() does return id(new PhutilSortVector())->addInt(-$this->getActionStrength()) (note the minus)
so I'm wondering if rPf4d9d6920bcdcafedd6a05f34c28642589b3c285 broke something while it was supposed to do the opposite (cannot remember another recent commit that feels related to this area).

Applying the debug patch in P45, output when creating a new task shows that Updated (defined in https://we.phorge.it/source/phorge/browse/master/src/applications/transactions/storage/PhabricatorApplicationTransaction.php;877ac8a873f979f418064eb2f36f1148c9838694$1611-1612) wins over Created (defined in https://we.phorge.it/source/phorge/browse/master/src/applications/maniphest/xaction/ManiphestTaskTitleTransaction.php;877ac8a873f979f418064eb2f36f1148c9838694$24) as ActionName, likely due to rPf4d9d6920bcdcafedd6a05f34c28642589b3c285 :

[0]
PHLOG: 'PATE: TransactionType: core:create' at [/var/www/html/phorge/phorge/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1625]
PHLOG: 'PAT: TA Type: core:create' at [/var/www/html/phorge/phorge/src/applications/transactions/storage/PhabricatorApplicationTransaction.php:1601]
PHLOG: 'PATE: ActionName:      Updated' at [/var/www/html/phorge/phorge/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1626]
PHLOG: 'PATE: ActionStrength:  140' at [/var/www/html/phorge/phorge/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1627]

[2]
PHLOG: 'PATE: TransactionType: title' at [/var/www/html/phorge/phorge/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1625]
PHLOG: 'PATE: ActionName:      Created' at [/var/www/html/phorge/phorge/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1626]
PHLOG: 'PATE: ActionStrength:  140' at [/var/www/html/phorge/phorge/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1627]

PHLOG: 'PATE: actions by strength:{"0":{},"2":{},"4":{},"3":{},"5":{},"1":{},"6":{},"7":{},"9":{},"8":{}}' at [/var/www/html/phorge/phorge/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1630]