Page MenuHomePhabricator

No notification is sent to a task when a new subtask of it is created & that new subtask's status is "Open"
Closed, ResolvedPublicBUG REPORT

Description

Upstream ticket: https://we.phorge.it/T16275

Steps to replicate the issue

  • Create a Phabricator task.
  • Using the Edit Related Tasks...Create Subtask links in that task's sidebar, create a subtask of that task, without changing the default "Status" value for the new subtask being created.

What happens?
No notification/transaction is sent to the parent task to inform it[s subscribers] of the new blocking subtask that's been created.
If the subscribers list of the new task is pruned prior to its creation (as IIUC would happen automatically with T239378: Disable parent task metadata by default for new sub tasks, and as might be currently recommended), that task's subscribers therefore won't be aware of the new subtask unless they happen to check the task-graph themselves later on.

What should have happened instead?
Compare this behaviour to what happens when you create a subtask following the steps above, but - in the task creation form - set "Status" to anything other than Open -- when creating a new task with a non-Open status, a "<user> created subtask <task>" notification is sent to the parent task! (See https://phabricator.wmcloud.org/T193 for examples of this on Test-Phab, and T403982#11185954 for the example I noticed of this happening in production Phab.)

This notification/transaction should presumably therefore also be being sent when a subtask is created with the Open status.

Software version
b9c1b0839aba

Other information

Event Timeline

This is feeling to me like it's likely a regression... I've found examples from late 2017 where it looks like subtasks have been created with the Open status, and a notification has been sent to the parent task - e.g. T42812#3811113, T110353#3807023, T178215#3787657.

It seems like this might have stopped working on Wikimedia Phabricator somewhere between 2017-12-05 16:18 & 2017-12-05 21:14 (judging by T182121, the creation of which did send a notification to its parent task; and T182147, the creation of which didn't).
I haven't been able to find any log so far of a Phabricator code update/deployment having occurred between those times, though. The top two SAL entries here fit the timeframe, but - at a first look - I don't understand how running the bin/garbage & bin/search commands could have modified this behaviour.

At a first glance of the Phabricator commit log from around that sort of time, the change made to ManiphestTaskStatusTransaction.php in https://gitlab.wikimedia.org/repos/phabricator/phabricator/-/commit/d321cc810aab52be00d75c9dcfa8b9cabd34828e seems potentially interesting at a half-guess.

@A_smart_kitten: Thanks for digging into this, very helpful!
This is an upstream issue.
ManiphestTransactionEditor::applyFinalEffects() checks for ManiphestTaskStatusTransaction::TRANSACTIONTYPE which is not used anymore since rPHABd321cc81 when creating (sub)tasks (notifications in a parent task still show up when e.g. closing a subtask).
I believe the code needs adjustment to also check for ManiphestTaskParentTransaction::TRANSACTIONTYPE.

Aklapper triaged this task as Low priority.
Aklapper moved this task from Reported Upstream to Patch proposed upstream on the Upstream board.

This ticket got resolved today as part of the Phabricator upgrade in T409947. See J322 for a full list of changes.

screenshot.png (114×2 px, 39 KB)

<3
I love that this is now working (again) :)