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

Move misplaced validation for ambiguous fields in "Test Plan" to the right place

Summary:
When users use the web UI to enter text like "Reviewers: x" into the "Summary" or "Test Plan", we can end up with an ambiguous commit message.

Some time ago we added a warning about this to the "Summary" field, and //attempted// to add it to the "Test Plan" field, but it actually gets called from the wrong place.

Remove the code from the wrong place (no callers, not reachable) and put it in the right place.

This fixes an issue where users could edit a test plan from the web UI to add the text "Tests: ..." and cause ambiguities on a later "arc diff --edit".

Test Plan: {F5026603}

Reviewers: chad, amckinley

Reviewed By: chad

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

+4 -8
-7
src/applications/differential/field/DifferentialTestPlanCommitMessageField.php
··· 50 50 ); 51 51 } 52 52 53 - public function validateTransactions($object, array $xactions) { 54 - return $this->validateCommitMessageCorpusTransactions( 55 - $object, 56 - $xactions, 57 - pht('Test Plan')); 58 - } 59 - 60 53 }
+4 -1
src/applications/differential/xaction/DifferentialRevisionTestPlanTransaction.php
··· 55 55 } 56 56 57 57 public function validateTransactions($object, array $xactions) { 58 - $errors = array(); 58 + $errors = $this->validateCommitMessageCorpusTransactions( 59 + $object, 60 + $xactions, 61 + pht('Test Plan')); 59 62 60 63 $is_required = PhabricatorEnv::getEnvConfig( 61 64 'differential.require-test-plan-field');