@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Detect edits which don't actually change projects in Maniphest tasks

Summary:
Be smarter about detecting when projects haven't actually changed so we don't
create silly transactions which just reorder them or change (entirely arbitrary)
dictionary keys.

Test Plan:
Edited a task with several projects and swapped their order, didn't get a bogus
project transaction.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: anjali, sandra, aran, tuomaspelkonen, epriestley
Differential Revision: 249

+10 -3
+10 -3
src/applications/maniphest/controller/taskedit/ManiphestTaskEditController.php
··· 112 112 $changes[ManiphestTransactionType::TYPE_CCS] = $request->getArr('cc'); 113 113 } 114 114 115 - if ($request->getArr('projects') != $task->getProjectPHIDs()) { 116 - $changes[ManiphestTransactionType::TYPE_PROJECTS] 117 - = $request->getArr('projects'); 115 + $new_proj_arr = $request->getArr('projects'); 116 + $new_proj_arr = array_values($new_proj_arr); 117 + sort($new_proj_arr); 118 + 119 + $cur_proj_arr = $task->getProjectPHIDs(); 120 + $cur_proj_arr = array_values($cur_proj_arr); 121 + sort($cur_proj_arr); 122 + 123 + if ($new_proj_arr != $cur_proj_arr) { 124 + $changes[ManiphestTransactionType::TYPE_PROJECTS] = $new_proj_arr; 118 125 } 119 126 120 127 if ($files) {