@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.

Remove ManiphestTransactionType

Summary: These constants have moved to ManiphestTransaction. The other method only has one plausible callsite, just inline it.

Test Plan: Used Maniphest.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7113

+98 -123
-2
src/__phutil_library_map__.php
··· 737 737 'ManiphestTransactionPreviewController' => 'applications/maniphest/controller/ManiphestTransactionPreviewController.php', 738 738 'ManiphestTransactionQuery' => 'applications/maniphest/query/ManiphestTransactionQuery.php', 739 739 'ManiphestTransactionSaveController' => 'applications/maniphest/controller/ManiphestTransactionSaveController.php', 740 - 'ManiphestTransactionType' => 'applications/maniphest/constants/ManiphestTransactionType.php', 741 740 'ManiphestView' => 'applications/maniphest/view/ManiphestView.php', 742 741 'MetaMTAConstants' => 'applications/metamta/constants/MetaMTAConstants.php', 743 742 'MetaMTANotificationType' => 'applications/metamta/constants/MetaMTANotificationType.php', ··· 2829 2828 'ManiphestTransactionPreviewController' => 'ManiphestController', 2830 2829 'ManiphestTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 2831 2830 'ManiphestTransactionSaveController' => 'ManiphestController', 2832 - 'ManiphestTransactionType' => 'ManiphestConstants', 2833 2831 'ManiphestView' => 'AphrontView', 2834 2832 'MetaMTANotificationType' => 'MetaMTAConstants', 2835 2833 'MetaMTAReceivedMailStatus' => 'MetaMTAConstants',
+9 -9
src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php
··· 62 62 if ($is_new) { 63 63 $task->setTitle((string)$request->getValue('title')); 64 64 $task->setDescription((string)$request->getValue('description')); 65 - $changes[ManiphestTransactionType::TYPE_STATUS] = 65 + $changes[ManiphestTransaction::TYPE_STATUS] = 66 66 ManiphestTaskStatus::STATUS_OPEN; 67 67 } else { 68 68 ··· 73 73 74 74 $title = $request->getValue('title'); 75 75 if ($title !== null) { 76 - $changes[ManiphestTransactionType::TYPE_TITLE] = $title; 76 + $changes[ManiphestTransaction::TYPE_TITLE] = $title; 77 77 } 78 78 79 79 $desc = $request->getValue('description'); 80 80 if ($desc !== null) { 81 - $changes[ManiphestTransactionType::TYPE_DESCRIPTION] = $desc; 81 + $changes[ManiphestTransaction::TYPE_DESCRIPTION] = $desc; 82 82 } 83 83 84 84 $status = $request->getValue('status'); ··· 88 88 throw id(new ConduitException('ERR-INVALID-PARAMETER')) 89 89 ->setErrorDescription('Status set to invalid value.'); 90 90 } 91 - $changes[ManiphestTransactionType::TYPE_STATUS] = $status; 91 + $changes[ManiphestTransaction::TYPE_STATUS] = $status; 92 92 } 93 93 } 94 94 ··· 99 99 throw id(new ConduitException('ERR-INVALID-PARAMETER')) 100 100 ->setErrorDescription('Priority set to invalid value.'); 101 101 } 102 - $changes[ManiphestTransactionType::TYPE_PRIORITY] = $priority; 102 + $changes[ManiphestTransaction::TYPE_PRIORITY] = $priority; 103 103 } 104 104 105 105 $owner_phid = $request->getValue('ownerPHID'); ··· 107 107 $this->validatePHIDList(array($owner_phid), 108 108 PhabricatorPeoplePHIDTypeUser::TYPECONST, 109 109 'ownerPHID'); 110 - $changes[ManiphestTransactionType::TYPE_OWNER] = $owner_phid; 110 + $changes[ManiphestTransaction::TYPE_OWNER] = $owner_phid; 111 111 } 112 112 113 113 $ccs = $request->getValue('ccPHIDs'); ··· 115 115 $this->validatePHIDList($ccs, 116 116 PhabricatorPeoplePHIDTypeUser::TYPECONST, 117 117 'ccPHIDS'); 118 - $changes[ManiphestTransactionType::TYPE_CCS] = $ccs; 118 + $changes[ManiphestTransaction::TYPE_CCS] = $ccs; 119 119 } 120 120 121 121 $project_phids = $request->getValue('projectPHIDs'); ··· 123 123 $this->validatePHIDList($project_phids, 124 124 PhabricatorProjectPHIDTypeProject::TYPECONST, 125 125 'projectPHIDS'); 126 - $changes[ManiphestTransactionType::TYPE_PROJECTS] = $project_phids; 126 + $changes[ManiphestTransaction::TYPE_PROJECTS] = $project_phids; 127 127 } 128 128 129 129 $file_phids = $request->getValue('filePHIDs'); ··· 135 135 $attached = $task->getAttached(); 136 136 $attached[PhabricatorFilePHIDTypeFile::TYPECONST] = $file_map; 137 137 138 - $changes[ManiphestTransactionType::TYPE_ATTACH] = $attached; 138 + $changes[ManiphestTransaction::TYPE_ATTACH] = $attached; 139 139 } 140 140 141 141 $template = new ManiphestTransaction();
+8 -8
src/applications/maniphest/constants/ManiphestAction.php
··· 15 15 /* these actions are determined sufficiently by the transaction 16 16 type and thus we use them here*/ 17 17 const ACTION_COMMENT = PhabricatorTransactions::TYPE_COMMENT; 18 - const ACTION_CC = ManiphestTransactionType::TYPE_CCS; 19 - const ACTION_PRIORITY = ManiphestTransactionType::TYPE_PRIORITY; 20 - const ACTION_PROJECT = ManiphestTransactionType::TYPE_PROJECTS; 21 - const ACTION_TITLE = ManiphestTransactionType::TYPE_TITLE; 22 - const ACTION_DESCRIPTION = ManiphestTransactionType::TYPE_DESCRIPTION; 23 - const ACTION_REASSIGN = ManiphestTransactionType::TYPE_OWNER; 24 - const ACTION_ATTACH = ManiphestTransactionType::TYPE_ATTACH; 25 - const ACTION_EDGE = ManiphestTransactionType::TYPE_EDGE; 18 + const ACTION_CC = ManiphestTransaction::TYPE_CCS; 19 + const ACTION_PRIORITY = ManiphestTransaction::TYPE_PRIORITY; 20 + const ACTION_PROJECT = ManiphestTransaction::TYPE_PROJECTS; 21 + const ACTION_TITLE = ManiphestTransaction::TYPE_TITLE; 22 + const ACTION_DESCRIPTION = ManiphestTransaction::TYPE_DESCRIPTION; 23 + const ACTION_REASSIGN = ManiphestTransaction::TYPE_OWNER; 24 + const ACTION_ATTACH = ManiphestTransaction::TYPE_ATTACH; 25 + const ACTION_EDGE = ManiphestTransaction::TYPE_EDGE; 26 26 const ACTION_AUXILIARY = PhabricatorTransactions::TYPE_CUSTOMFIELD; 27 27 28 28 public static function getActionPastTenseVerb($action) {
-32
src/applications/maniphest/constants/ManiphestTransactionType.php
··· 1 - <?php 2 - 3 - /** 4 - * @group maniphest 5 - */ 6 - final class ManiphestTransactionType extends ManiphestConstants { 7 - 8 - const TYPE_STATUS = 'status'; 9 - const TYPE_OWNER = 'reassign'; 10 - const TYPE_CCS = 'ccs'; 11 - const TYPE_PROJECTS = 'projects'; 12 - const TYPE_PRIORITY = 'priority'; 13 - 14 - const TYPE_ATTACH = 'attach'; 15 - const TYPE_EDGE = 'edge'; 16 - 17 - const TYPE_TITLE = 'title'; 18 - const TYPE_DESCRIPTION = 'description'; 19 - 20 - public static function getTransactionTypeMap() { 21 - return array( 22 - PhabricatorTransactions::TYPE_COMMENT => pht('Comment'), 23 - self::TYPE_STATUS => pht('Close Task'), 24 - self::TYPE_OWNER => pht('Reassign / Claim'), 25 - self::TYPE_CCS => pht('Add CCs'), 26 - self::TYPE_PRIORITY => pht('Change Priority'), 27 - self::TYPE_ATTACH => pht('Upload File'), 28 - self::TYPE_PROJECTS => pht('Associate Projects'), 29 - ); 30 - } 31 - 32 - }
+17 -17
src/applications/maniphest/controller/ManiphestBatchEditController.php
··· 158 158 $value_map = array(); 159 159 $type_map = array( 160 160 'add_comment' => PhabricatorTransactions::TYPE_COMMENT, 161 - 'assign' => ManiphestTransactionType::TYPE_OWNER, 162 - 'status' => ManiphestTransactionType::TYPE_STATUS, 163 - 'priority' => ManiphestTransactionType::TYPE_PRIORITY, 164 - 'add_project' => ManiphestTransactionType::TYPE_PROJECTS, 165 - 'remove_project' => ManiphestTransactionType::TYPE_PROJECTS, 166 - 'add_ccs' => ManiphestTransactionType::TYPE_CCS, 167 - 'remove_ccs' => ManiphestTransactionType::TYPE_CCS, 161 + 'assign' => ManiphestTransaction::TYPE_OWNER, 162 + 'status' => ManiphestTransaction::TYPE_STATUS, 163 + 'priority' => ManiphestTransaction::TYPE_PRIORITY, 164 + 'add_project' => ManiphestTransaction::TYPE_PROJECTS, 165 + 'remove_project' => ManiphestTransaction::TYPE_PROJECTS, 166 + 'add_ccs' => ManiphestTransaction::TYPE_CCS, 167 + 'remove_ccs' => ManiphestTransaction::TYPE_CCS, 168 168 ); 169 169 170 170 $edge_edit_types = array( ··· 195 195 case PhabricatorTransactions::TYPE_COMMENT: 196 196 $current = null; 197 197 break; 198 - case ManiphestTransactionType::TYPE_OWNER: 198 + case ManiphestTransaction::TYPE_OWNER: 199 199 $current = $task->getOwnerPHID(); 200 200 break; 201 - case ManiphestTransactionType::TYPE_STATUS: 201 + case ManiphestTransaction::TYPE_STATUS: 202 202 $current = $task->getStatus(); 203 203 break; 204 - case ManiphestTransactionType::TYPE_PRIORITY: 204 + case ManiphestTransaction::TYPE_PRIORITY: 205 205 $current = $task->getPriority(); 206 206 break; 207 - case ManiphestTransactionType::TYPE_PROJECTS: 207 + case ManiphestTransaction::TYPE_PROJECTS: 208 208 $current = $task->getProjectPHIDs(); 209 209 break; 210 - case ManiphestTransactionType::TYPE_CCS: 210 + case ManiphestTransaction::TYPE_CCS: 211 211 $current = $task->getCCPHIDs(); 212 212 break; 213 213 } ··· 224 224 continue 2; 225 225 } 226 226 break; 227 - case ManiphestTransactionType::TYPE_OWNER: 227 + case ManiphestTransaction::TYPE_OWNER: 228 228 if (empty($value)) { 229 229 continue 2; 230 230 } ··· 233 233 $value = null; 234 234 } 235 235 break; 236 - case ManiphestTransactionType::TYPE_PROJECTS: 236 + case ManiphestTransaction::TYPE_PROJECTS: 237 237 if (empty($value)) { 238 238 continue 2; 239 239 } 240 240 break; 241 - case ManiphestTransactionType::TYPE_CCS: 241 + case ManiphestTransaction::TYPE_CCS: 242 242 if (empty($value)) { 243 243 continue 2; 244 244 } ··· 265 265 $value = $current."\n\n".$value; 266 266 } 267 267 break; 268 - case ManiphestTransactionType::TYPE_PROJECTS: 269 - case ManiphestTransactionType::TYPE_CCS: 268 + case ManiphestTransaction::TYPE_PROJECTS: 269 + case ManiphestTransaction::TYPE_CCS: 270 270 $remove_actions = array( 271 271 'remove_project' => true, 272 272 'remove_ccs' => true,
+1 -1
src/applications/maniphest/controller/ManiphestReportController.php
··· 100 100 ORDER BY x.dateCreated ASC', 101 101 $table->getTableName(), 102 102 $joins, 103 - ManiphestTransactionType::TYPE_STATUS); 103 + ManiphestTransaction::TYPE_STATUS); 104 104 105 105 $stats = array(); 106 106 $day_buckets = array();
+22 -13
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 146 146 147 147 $engine->process(); 148 148 149 - $transaction_types = ManiphestTransactionType::getTransactionTypeMap(); 150 149 $resolution_types = ManiphestTaskStatus::getTaskStatusMap(); 151 150 151 + $transaction_types = array( 152 + PhabricatorTransactions::TYPE_COMMENT => pht('Comment'), 153 + ManiphestTransaction::TYPE_STATUS => pht('Close Task'), 154 + ManiphestTransaction::TYPE_OWNER => pht('Reassign / Claim'), 155 + ManiphestTransaction::TYPE_CCS => pht('Add CCs'), 156 + ManiphestTransaction::TYPE_PRIORITY => pht('Change Priority'), 157 + ManiphestTransaction::TYPE_ATTACH => pht('Upload File'), 158 + ManiphestTransaction::TYPE_PROJECTS => pht('Associate Projects'), 159 + ); 160 + 152 161 if ($task->getStatus() == ManiphestTaskStatus::STATUS_OPEN) { 153 162 $resolution_types = array_select_keys( 154 163 $resolution_types, ··· 162 171 $resolution_types = array( 163 172 ManiphestTaskStatus::STATUS_OPEN => 'Reopened', 164 173 ); 165 - $transaction_types[ManiphestTransactionType::TYPE_STATUS] = 174 + $transaction_types[ManiphestTransaction::TYPE_STATUS] = 166 175 'Reopen Task'; 167 - unset($transaction_types[ManiphestTransactionType::TYPE_PRIORITY]); 168 - unset($transaction_types[ManiphestTransactionType::TYPE_OWNER]); 176 + unset($transaction_types[ManiphestTransaction::TYPE_PRIORITY]); 177 + unset($transaction_types[ManiphestTransaction::TYPE_OWNER]); 169 178 } 170 179 171 180 $default_claim = array( ··· 260 269 ->setValue($is_serious ? pht('Submit') : pht('Avast!'))); 261 270 262 271 $control_map = array( 263 - ManiphestTransactionType::TYPE_STATUS => 'resolution', 264 - ManiphestTransactionType::TYPE_OWNER => 'assign_to', 265 - ManiphestTransactionType::TYPE_CCS => 'ccs', 266 - ManiphestTransactionType::TYPE_PRIORITY => 'priority', 267 - ManiphestTransactionType::TYPE_PROJECTS => 'projects', 268 - ManiphestTransactionType::TYPE_ATTACH => 'file', 272 + ManiphestTransaction::TYPE_STATUS => 'resolution', 273 + ManiphestTransaction::TYPE_OWNER => 'assign_to', 274 + ManiphestTransaction::TYPE_CCS => 'ccs', 275 + ManiphestTransaction::TYPE_PRIORITY => 'priority', 276 + ManiphestTransaction::TYPE_PROJECTS => 'projects', 277 + ManiphestTransaction::TYPE_ATTACH => 'file', 269 278 ); 270 279 271 280 $tokenizer_map = array( 272 - ManiphestTransactionType::TYPE_PROJECTS => array( 281 + ManiphestTransaction::TYPE_PROJECTS => array( 273 282 'id' => 'projects-tokenizer', 274 283 'src' => '/typeahead/common/projects/', 275 284 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'), 276 285 'placeholder' => pht('Type a project name...'), 277 286 ), 278 - ManiphestTransactionType::TYPE_OWNER => array( 287 + ManiphestTransaction::TYPE_OWNER => array( 279 288 'id' => 'assign-tokenizer', 280 289 'src' => '/typeahead/common/users/', 281 290 'value' => $default_claim, ··· 283 292 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'), 284 293 'placeholder' => pht('Type a user name...'), 285 294 ), 286 - ManiphestTransactionType::TYPE_CCS => array( 295 + ManiphestTransaction::TYPE_CCS => array( 287 296 'id' => 'cc-tokenizer', 288 297 'src' => '/typeahead/common/mailable/', 289 298 'ondemand' => PhabricatorEnv::getEnvConfig('tokenizer.ondemand'),
+9 -9
src/applications/maniphest/controller/ManiphestTaskEditController.php
··· 108 108 109 109 if ($task->getID()) { 110 110 if ($new_title != $task->getTitle()) { 111 - $changes[ManiphestTransactionType::TYPE_TITLE] = $new_title; 111 + $changes[ManiphestTransaction::TYPE_TITLE] = $new_title; 112 112 } 113 113 if ($new_desc != $task->getDescription()) { 114 - $changes[ManiphestTransactionType::TYPE_DESCRIPTION] = $new_desc; 114 + $changes[ManiphestTransaction::TYPE_DESCRIPTION] = $new_desc; 115 115 } 116 116 if ($new_status != $task->getStatus()) { 117 - $changes[ManiphestTransactionType::TYPE_STATUS] = $new_status; 117 + $changes[ManiphestTransaction::TYPE_STATUS] = $new_status; 118 118 } 119 119 } else { 120 120 $task->setTitle($new_title); 121 121 $task->setDescription($new_desc); 122 - $changes[ManiphestTransactionType::TYPE_STATUS] = 122 + $changes[ManiphestTransaction::TYPE_STATUS] = 123 123 ManiphestTaskStatus::STATUS_OPEN; 124 124 125 125 $workflow = 'create'; ··· 172 172 $task->setProjectPHIDs($request->getArr('projects')); 173 173 } else { 174 174 if ($request->getInt('priority') != $task->getPriority()) { 175 - $changes[ManiphestTransactionType::TYPE_PRIORITY] = 175 + $changes[ManiphestTransaction::TYPE_PRIORITY] = 176 176 $request->getInt('priority'); 177 177 } 178 178 179 179 if ($owner_phid != $task->getOwnerPHID()) { 180 - $changes[ManiphestTransactionType::TYPE_OWNER] = $owner_phid; 180 + $changes[ManiphestTransaction::TYPE_OWNER] = $owner_phid; 181 181 } 182 182 183 183 if ($request->getArr('cc') != $task->getCCPHIDs()) { 184 - $changes[ManiphestTransactionType::TYPE_CCS] = $request->getArr('cc'); 184 + $changes[ManiphestTransaction::TYPE_CCS] = $request->getArr('cc'); 185 185 } 186 186 187 187 $new_proj_arr = $request->getArr('projects'); ··· 193 193 sort($cur_proj_arr); 194 194 195 195 if ($new_proj_arr != $cur_proj_arr) { 196 - $changes[ManiphestTransactionType::TYPE_PROJECTS] = $new_proj_arr; 196 + $changes[ManiphestTransaction::TYPE_PROJECTS] = $new_proj_arr; 197 197 } 198 198 199 199 if ($files) { 200 200 $file_map = mpull($files, 'getPHID'); 201 201 $file_map = array_fill_keys($file_map, array()); 202 - $changes[ManiphestTransactionType::TYPE_ATTACH] = array( 202 + $changes[ManiphestTransaction::TYPE_ATTACH] = array( 203 203 PhabricatorFilePHIDTypeFile::TYPECONST => $file_map, 204 204 ); 205 205 }
+4 -4
src/applications/maniphest/controller/ManiphestTransactionPreviewController.php
··· 45 45 // grab phids for handles and set transaction values based on action and 46 46 // value (empty or control-specific format) coming in from the wire 47 47 switch ($action) { 48 - case ManiphestTransactionType::TYPE_PRIORITY: 48 + case ManiphestTransaction::TYPE_PRIORITY: 49 49 $transaction->setOldValue($task->getPriority()); 50 50 $transaction->setNewValue($value); 51 51 break; 52 - case ManiphestTransactionType::TYPE_OWNER: 52 + case ManiphestTransaction::TYPE_OWNER: 53 53 if ($value) { 54 54 $value = current(json_decode($value)); 55 55 $phids = array($value); ··· 58 58 } 59 59 $transaction->setNewValue($value); 60 60 break; 61 - case ManiphestTransactionType::TYPE_CCS: 61 + case ManiphestTransaction::TYPE_CCS: 62 62 if ($value) { 63 63 $value = json_decode($value); 64 64 } ··· 75 75 $transaction->setOldValue($task->getCCPHIDs()); 76 76 $transaction->setNewValue($value); 77 77 break; 78 - case ManiphestTransactionType::TYPE_PROJECTS: 78 + case ManiphestTransaction::TYPE_PROJECTS: 79 79 if ($value) { 80 80 $value = json_decode($value); 81 81 }
+13 -13
src/applications/maniphest/controller/ManiphestTransactionSaveController.php
··· 33 33 34 34 // This means "attach a file" even though we store other types of data 35 35 // as 'attached'. 36 - if ($action == ManiphestTransactionType::TYPE_ATTACH) { 36 + if ($action == ManiphestTransaction::TYPE_ATTACH) { 37 37 if (!empty($_FILES['file'])) { 38 38 $err = idx($_FILES['file'], 'error'); 39 39 if ($err != UPLOAD_ERR_NO_FILE) { ··· 61 61 } 62 62 $transaction = new ManiphestTransaction(); 63 63 $transaction 64 - ->setTransactionType(ManiphestTransactionType::TYPE_ATTACH); 64 + ->setTransactionType(ManiphestTransaction::TYPE_ATTACH); 65 65 $transaction->setNewValue($new); 66 66 $transactions[] = $transaction; 67 67 } ··· 78 78 79 79 $cc_transaction = new ManiphestTransaction(); 80 80 $cc_transaction 81 - ->setTransactionType(ManiphestTransactionType::TYPE_CCS); 81 + ->setTransactionType(ManiphestTransaction::TYPE_CCS); 82 82 83 83 $transaction = new ManiphestTransaction(); 84 84 $transaction 85 85 ->setTransactionType($action); 86 86 87 87 switch ($action) { 88 - case ManiphestTransactionType::TYPE_STATUS: 88 + case ManiphestTransaction::TYPE_STATUS: 89 89 $transaction->setNewValue($request->getStr('resolution')); 90 90 break; 91 - case ManiphestTransactionType::TYPE_OWNER: 91 + case ManiphestTransaction::TYPE_OWNER: 92 92 $assign_to = $request->getArr('assign_to'); 93 93 $assign_to = reset($assign_to); 94 94 $transaction->setNewValue($assign_to); 95 95 break; 96 - case ManiphestTransactionType::TYPE_PROJECTS: 96 + case ManiphestTransaction::TYPE_PROJECTS: 97 97 $projects = $request->getArr('projects'); 98 98 $projects = array_merge($projects, $task->getProjectPHIDs()); 99 99 $projects = array_filter($projects); 100 100 $projects = array_unique($projects); 101 101 $transaction->setNewValue($projects); 102 102 break; 103 - case ManiphestTransactionType::TYPE_CCS: 103 + case ManiphestTransaction::TYPE_CCS: 104 104 // Accumulate the new explicit CCs into the array that we'll add in 105 105 // the CC transaction later. 106 106 $added_ccs = array_merge($added_ccs, $request->getArr('ccs')); ··· 108 108 // Throw away the primary transaction. 109 109 $transaction = null; 110 110 break; 111 - case ManiphestTransactionType::TYPE_PRIORITY: 111 + case ManiphestTransaction::TYPE_PRIORITY: 112 112 $transaction->setNewValue($request->getInt('priority')); 113 113 break; 114 - case ManiphestTransactionType::TYPE_ATTACH: 114 + case ManiphestTransaction::TYPE_ATTACH: 115 115 // Nuke this, we created it above. 116 116 $transaction = null; 117 117 break; ··· 143 143 144 144 $implicitly_claimed = false; 145 145 switch ($action) { 146 - case ManiphestTransactionType::TYPE_OWNER: 146 + case ManiphestTransaction::TYPE_OWNER: 147 147 if ($task->getOwnerPHID() == $transaction->getNewValue()) { 148 148 // If this is actually no-op, don't generate the side effect. 149 149 break; ··· 151 151 // Otherwise, when a task is reassigned, move the previous owner to CC. 152 152 $added_ccs[] = $task->getOwnerPHID(); 153 153 break; 154 - case ManiphestTransactionType::TYPE_STATUS: 154 + case ManiphestTransaction::TYPE_STATUS: 155 155 if (!$task->getOwnerPHID() && 156 156 $request->getStr('resolution') != 157 157 ManiphestTaskStatus::STATUS_OPEN) { 158 158 // Closing an unassigned task. Assign the user as the owner of 159 159 // this task. 160 160 $assign = new ManiphestTransaction(); 161 - $assign->setTransactionType(ManiphestTransactionType::TYPE_OWNER); 161 + $assign->setTransactionType(ManiphestTransaction::TYPE_OWNER); 162 162 $assign->setNewValue($user->getPHID()); 163 163 $transactions[] = $assign; 164 164 ··· 172 172 if ($implicitly_claimed) { 173 173 $user_owns_task = true; 174 174 } else { 175 - if ($action == ManiphestTransactionType::TYPE_OWNER) { 175 + if ($action == ManiphestTransaction::TYPE_OWNER) { 176 176 if ($transaction->getNewValue() == $user->getPHID()) { 177 177 $user_owns_task = true; 178 178 }
+1 -1
src/applications/maniphest/event/ManiphestEdgeEventListener.php
··· 82 82 } 83 83 84 84 $xactions[] = id(new ManiphestTransaction()) 85 - ->setTransactionType(ManiphestTransactionType::TYPE_EDGE) 85 + ->setTransactionType(ManiphestTransaction::TYPE_EDGE) 86 86 ->setOldValue($old_type) 87 87 ->setNewValue($new_type) 88 88 ->setMetadataValue('edge:type', $type);
+7 -7
src/applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php
··· 20 20 $template = new ManiphestTransaction(); 21 21 // Accumulate Transactions 22 22 $changes = array(); 23 - $changes[ManiphestTransactionType::TYPE_TITLE] = 23 + $changes[ManiphestTransaction::TYPE_TITLE] = 24 24 $this->generateTitle(); 25 - $changes[ManiphestTransactionType::TYPE_DESCRIPTION] = 25 + $changes[ManiphestTransaction::TYPE_DESCRIPTION] = 26 26 $this->generateDescription(); 27 - $changes[ManiphestTransactionType::TYPE_OWNER] = 27 + $changes[ManiphestTransaction::TYPE_OWNER] = 28 28 $this->loadOwnerPHID(); 29 - $changes[ManiphestTransactionType::TYPE_STATUS] = 29 + $changes[ManiphestTransaction::TYPE_STATUS] = 30 30 $this->generateTaskStatus(); 31 - $changes[ManiphestTransactionType::TYPE_PRIORITY] = 31 + $changes[ManiphestTransaction::TYPE_PRIORITY] = 32 32 $this->generateTaskPriority(); 33 - $changes[ManiphestTransactionType::TYPE_CCS] = 33 + $changes[ManiphestTransaction::TYPE_CCS] = 34 34 $this->getCCPHIDs(); 35 - $changes[ManiphestTransactionType::TYPE_PROJECTS] = 35 + $changes[ManiphestTransaction::TYPE_PROJECTS] = 36 36 $this->getProjectPHIDs(); 37 37 $transactions = array(); 38 38 foreach ($changes as $type => $value) {
+5 -5
src/applications/maniphest/mail/ManiphestReplyHandler.php
··· 63 63 // If this is a new task, create a "User created this task." transaction 64 64 // and then set the title and description. 65 65 $xaction = clone $template; 66 - $xaction->setTransactionType(ManiphestTransactionType::TYPE_STATUS); 66 + $xaction->setTransactionType(ManiphestTransaction::TYPE_STATUS); 67 67 $xaction->setNewValue(ManiphestTaskStatus::STATUS_OPEN); 68 68 $xactions[] = $xaction; 69 69 ··· 90 90 $new_value = null; 91 91 switch ($command) { 92 92 case 'close': 93 - $ttype = ManiphestTransactionType::TYPE_STATUS; 93 + $ttype = ManiphestTransaction::TYPE_STATUS; 94 94 $new_value = ManiphestTaskStatus::STATUS_CLOSED_RESOLVED; 95 95 break; 96 96 case 'claim': 97 - $ttype = ManiphestTransactionType::TYPE_OWNER; 97 + $ttype = ManiphestTransaction::TYPE_OWNER; 98 98 $new_value = $user->getPHID(); 99 99 break; 100 100 case 'unsubscribe': 101 101 $is_unsub = true; 102 - $ttype = ManiphestTransactionType::TYPE_CCS; 102 + $ttype = ManiphestTransaction::TYPE_CCS; 103 103 $ccs = $task->getCCPHIDs(); 104 104 foreach ($ccs as $k => $phid) { 105 105 if ($phid == $user->getPHID()) { ··· 138 138 139 139 if (array_diff($new_ccs, $old_ccs)) { 140 140 $cc_xaction = clone $template; 141 - $cc_xaction->setTransactionType(ManiphestTransactionType::TYPE_CCS); 141 + $cc_xaction->setTransactionType(ManiphestTransaction::TYPE_CCS); 142 142 $cc_xaction->setNewValue($new_ccs); 143 143 $xactions[] = $cc_xaction; 144 144 }
+2 -2
src/applications/search/controller/PhabricatorSearchAttachController.php
··· 176 176 $target->getOwnerPHID()); 177 177 178 178 $close_task = id(new ManiphestTransaction()) 179 - ->setTransactionType(ManiphestTransactionType::TYPE_STATUS) 179 + ->setTransactionType(ManiphestTransaction::TYPE_STATUS) 180 180 ->setNewValue(ManiphestTaskStatus::STATUS_CLOSED_DUPLICATE); 181 181 182 182 $merge_comment = id(new ManiphestTransaction()) ··· 201 201 $task_names = implode(', ', $task_names); 202 202 203 203 $add_ccs = id(new ManiphestTransaction()) 204 - ->setTransactionType(ManiphestTransactionType::TYPE_CCS) 204 + ->setTransactionType(ManiphestTransaction::TYPE_CCS) 205 205 ->setNewValue($all_ccs); 206 206 207 207 $merged_comment = id(new ManiphestTransaction())