Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4117624
D25991.1746996291.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
D25991.1746996291.diff
View Options
diff --git a/src/applications/maniphest/typeahead/ManiphestAssigneeDatasource.php b/src/applications/maniphest/typeahead/ManiphestAssigneeDatasource.php
--- a/src/applications/maniphest/typeahead/ManiphestAssigneeDatasource.php
+++ b/src/applications/maniphest/typeahead/ManiphestAssigneeDatasource.php
@@ -13,6 +13,7 @@
public function getComponentDatasources() {
return array(
+ new PhabricatorViewerDatasource(),
new PhabricatorPeopleDatasource(),
new PhabricatorPeopleNoOwnerDatasource(),
);
diff --git a/src/applications/people/typeahead/PhabricatorViewerDatasource.php b/src/applications/people/typeahead/PhabricatorViewerDatasource.php
--- a/src/applications/people/typeahead/PhabricatorViewerDatasource.php
+++ b/src/applications/people/typeahead/PhabricatorViewerDatasource.php
@@ -3,6 +3,8 @@
final class PhabricatorViewerDatasource
extends PhabricatorTypeaheadDatasource {
+ const FUNCTION_TOKEN = 'viewer()';
+
public function getBrowseTitle() {
return pht('Browse Viewer');
}
diff --git a/src/applications/project/trigger/PhabricatorProjectTriggerManiphestOwnerRule.php b/src/applications/project/trigger/PhabricatorProjectTriggerManiphestOwnerRule.php
--- a/src/applications/project/trigger/PhabricatorProjectTriggerManiphestOwnerRule.php
+++ b/src/applications/project/trigger/PhabricatorProjectTriggerManiphestOwnerRule.php
@@ -18,6 +18,9 @@
if ($value === PhabricatorPeopleNoOwnerDatasource::FUNCTION_TOKEN) {
$value = null;
}
+ if ($value === PhabricatorViewerDatasource::FUNCTION_TOKEN) {
+ $value = $this->getViewer()->getPHID();
+ }
return $value;
}
@@ -35,7 +38,8 @@
throw new Exception(
pht(
'Owner rule value is required. Specify a user to assign tasks '.
- 'to, or the token "none()" to unassign tasks.'));
+ 'to, the token "viewer()" to assign to the user moving tasks, '.
+ 'or the token "none()" to unassign tasks.'));
}
if (count($value) > 1) {
@@ -123,7 +127,13 @@
}
public function getRuleViewDescription($value) {
- $value = $this->convertTokenizerValueToOwner($value);
+ if (head($value) === PhabricatorViewerDatasource::FUNCTION_TOKEN) {
+ // TODO: String concatenation breaks 18n because of grammatical case;
+ // full string is "Assign task to user moving the task".
+ $value = 'user moving the task';
+ } else {
+ $value = $this->convertTokenizerValueToOwner($value);
+ }
if (!$value) {
return pht('Unassign task.');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 11, 20:44 (14 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1560768
Default Alt Text
D25991.1746996291.diff (2 KB)
Attached To
Mode
D25991: Column triggers: Allow assigning user who performs the move
Attached
Detach File
Event Timeline
Log In to Comment