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

Recognize remarkup custom fields as remarkup blocks

Summary:
Fixes T5916. Key insight here is that the screenshot shows a custom "Detail Solution / Notes" field, which is why this mojo doesn't work: custom remarkup fields don't emit their content for mention/file extraction.

Also fix a bug where multiple blocks with file PHIDs could be merged improperly, discarding some file PHIDs.

Test Plan: Added a custom remarkup field, added files to it, saw them attach to the task when changes were saved.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5916

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

+12 -3
+7
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldRemarkup.php
··· 19 19 return 'block'; 20 20 } 21 21 22 + public function getApplicationTransactionRemarkupBlocks( 23 + PhabricatorApplicationTransaction $xaction) { 24 + return array( 25 + $xaction->getNewValue(), 26 + ); 27 + } 28 + 22 29 public function renderPropertyViewValue(array $handles) { 23 30 $value = $this->getFieldValue(); 24 31
+5 -3
src/infrastructure/markup/PhabricatorMarkupEngine.php
··· 530 530 531 531 foreach ($content_blocks as $content_block) { 532 532 $engine->markupText($content_block); 533 - $ids = $engine->getTextMetadata( 533 + $phids = $engine->getTextMetadata( 534 534 PhabricatorEmbedFileRemarkupRule::KEY_EMBED_FILE_PHIDS, 535 535 array()); 536 - $files += $ids; 536 + foreach ($phids as $phid) { 537 + $files[$phid] = $phid; 538 + } 537 539 } 538 540 539 - return $files; 541 + return array_values($files); 540 542 } 541 543 542 544 /**