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

Expose the "file attached to object" and "object attached to file" edges via "edge.search"

Summary:
See PHI1901. An install would like improved support for identifying files related to an object (like a task or revision) for retention/archival/backup/migration/snapshotting purposes.

The "attachment" edge is not really user-level: it just means "if you can see the object, that allows you to see the file". This set includes files that users may not think of as "attached", like thumbnails and internal objects which are attached for technical reasons.

However, this is generally an appropriate relationship to expose for retention purposes.

Test Plan: Used "edge.search" to find files attached to a revision and objects attached to a file.

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

+24
+12
src/applications/files/edge/PhabricatorFileHasObjectEdgeType.php
··· 12 12 return true; 13 13 } 14 14 15 + public function getConduitKey() { 16 + return 'file.attached-objects'; 17 + } 18 + 19 + public function getConduitName() { 20 + return pht('File Has Object'); 21 + } 22 + 23 + public function getConduitDescription() { 24 + return pht('The source file is attached to the destination object.'); 25 + } 26 + 15 27 }
+12
src/applications/transactions/edges/PhabricatorObjectHasFileEdgeType.php
··· 12 12 return true; 13 13 } 14 14 15 + public function getConduitKey() { 16 + return 'object.attached-files'; 17 + } 18 + 19 + public function getConduitName() { 20 + return pht('Object Has Files'); 21 + } 22 + 23 + public function getConduitDescription() { 24 + return pht('The source object is associated with the destination file.'); 25 + } 26 + 15 27 public function getTransactionAddString( 16 28 $actor, 17 29 $add_count,