mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 15:30:58 +01:00
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
This commit is contained in:
parent
d83a9c606b
commit
34a90a0d2b
2 changed files with 12 additions and 3 deletions
src/infrastructure
|
@ -19,6 +19,13 @@ final class PhabricatorStandardCustomFieldRemarkup
|
|||
return 'block';
|
||||
}
|
||||
|
||||
public function getApplicationTransactionRemarkupBlocks(
|
||||
PhabricatorApplicationTransaction $xaction) {
|
||||
return array(
|
||||
$xaction->getNewValue(),
|
||||
);
|
||||
}
|
||||
|
||||
public function renderPropertyViewValue(array $handles) {
|
||||
$value = $this->getFieldValue();
|
||||
|
||||
|
|
|
@ -530,13 +530,15 @@ final class PhabricatorMarkupEngine {
|
|||
|
||||
foreach ($content_blocks as $content_block) {
|
||||
$engine->markupText($content_block);
|
||||
$ids = $engine->getTextMetadata(
|
||||
$phids = $engine->getTextMetadata(
|
||||
PhabricatorEmbedFileRemarkupRule::KEY_EMBED_FILE_PHIDS,
|
||||
array());
|
||||
$files += $ids;
|
||||
foreach ($phids as $phid) {
|
||||
$files[$phid] = $phid;
|
||||
}
|
||||
}
|
||||
|
||||
return $files;
|
||||
return array_values($files);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue