Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14025066
D17805.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17805.diff
View Options
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -1191,12 +1191,23 @@
array $changes,
PhutilMarkupEngine $engine) {
- $flat_blocks = mpull($changes, 'getNewValue');
- $huge_block = implode("\n\n", $flat_blocks);
-
+ // For "Fixes ..." and "Depends on ...", we're only going to look at
+ // content blocks which are part of the revision itself (like "Summary"
+ // and "Test Plan"), not comments.
+ $content_parts = array();
+ foreach ($changes as $change) {
+ if ($change->getTransaction()->isCommentTransaction()) {
+ continue;
+ }
+ $content_parts[] = $change->getNewValue();
+ }
+ if (!$content_parts) {
+ return array();
+ }
+ $content_block = implode("\n\n", $content_parts);
$task_map = array();
$task_refs = id(new ManiphestCustomFieldStatusParser())
- ->parseCorpus($huge_block);
+ ->parseCorpus($content_block);
foreach ($task_refs as $match) {
foreach ($match['monograms'] as $monogram) {
$task_id = (int)trim($monogram, 'tT');
@@ -1206,7 +1217,7 @@
$rev_map = array();
$rev_refs = id(new DifferentialCustomFieldDependsOnParser())
- ->parseCorpus($huge_block);
+ ->parseCorpus($content_block);
foreach ($rev_refs as $match) {
foreach ($match['monograms'] as $monogram) {
$rev_id = (int)trim($monogram, 'dD');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 2:14 PM (4 d, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721809
Default Alt Text
D17805.diff (1 KB)
Attached To
Mode
D17805: Only recognize "Fixes ..." in main revision content like the Summary or Test Plan
Attached
Detach File
Event Timeline
Log In to Comment