mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
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
This commit is contained in:
parent
1f7c736f9a
commit
058d2489e7
2 changed files with 24 additions and 0 deletions
|
@ -12,4 +12,16 @@ final class PhabricatorFileHasObjectEdgeType extends PhabricatorEdgeType {
|
|||
return true;
|
||||
}
|
||||
|
||||
public function getConduitKey() {
|
||||
return 'file.attached-objects';
|
||||
}
|
||||
|
||||
public function getConduitName() {
|
||||
return pht('File Has Object');
|
||||
}
|
||||
|
||||
public function getConduitDescription() {
|
||||
return pht('The source file is attached to the destination object.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,18 @@ final class PhabricatorObjectHasFileEdgeType extends PhabricatorEdgeType {
|
|||
return true;
|
||||
}
|
||||
|
||||
public function getConduitKey() {
|
||||
return 'object.attached-files';
|
||||
}
|
||||
|
||||
public function getConduitName() {
|
||||
return pht('Object Has Files');
|
||||
}
|
||||
|
||||
public function getConduitDescription() {
|
||||
return pht('The source object is associated with the destination file.');
|
||||
}
|
||||
|
||||
public function getTransactionAddString(
|
||||
$actor,
|
||||
$add_count,
|
||||
|
|
Loading…
Reference in a new issue