Page MenuHomePhabricator

Diffusion closes tasks when commit message has a line ending in "fixes" followed by a line beginning with a Txxx task reference
Closed, WontfixPublic

Description

Hopefully this wasn't already reported upstream, if so I apologize.

@dzahn ran into this Phabricator behaviour on https://phabricator.wikimedia.org/T93645 where the commit messages in https://phabricator.wikimedia.org/rOPUP9743ea4423641a8be83bc397a5deda39f27e5157:

apt: indentation fixes

T93645

Change-Id: Iefdb89699e5f1c8606ae9595f1784774fcdac6de

and https://phabricator.wikimedia.org/rOPUP3577c5f9f7591c51c3162ac3b6c5b0669b36afd4:

datasets: indentation fixes

T93645

Change-Id: I214048b9aedf93560600f19269b96c95fd174545

(incorrectly) closed the mentioned task. I much prefer a solution where a) I can't accidentally close a task and b) I am not forced to use natural language in an unnatural way.

Event Timeline

20after4 raised the priority of this task from to Needs Triage.
20after4 updated the task description. (Show Details)
20after4 added a project: Diffusion.
20after4 added subscribers: 20after4, scfc.
epriestley claimed this task.
epriestley added a subscriber: epriestley.

In the general case, this is working as intended. Specifically, it's intentional that we accept linebreaks in the middle of a "Fixes X, Y" statement, because linebreaks aren't always added explicitly by users.

In this specific case, we could conceivably exclude statements containing multiple consecutive internal linebreaks, but that would still allow the user to accidentally close tasks with a single newline.

You can reconfigure maniphest.statuses to adjust the "prefixes" keywords. For example, you could change them into command strings like "phabricator-fixes" instead of "fixes", which would require users to write Phabricator-fixes T123 instead of Fixes T123. Note that these prefixes are not fully configurable (see T5132). This is not a change we're interested in pursuing in the upstream, because the feedback we receive about this feature is overwhelmingly that it is highly desirable in its current form.

From a user point of view, this won't happen if you write commit messages in natural language (for example, See T93645 for discussion. won't trigger this). Alternatively, Ref T93645 (vs bare T93645) will trigger Phabricator to create a stronger "reference" relationship instead of a weak/implicit "mention" relationship.

Finally, you can disable "Autoclose" for the repository to stop all automatic relationships.

@epriestley: Ok, thanks for clarification. I will refer people here if it comes up again :)