Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13995109
D7446.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7446.id.diff
View Options
Index: src/workflow/ArcanistTodoWorkflow.php
===================================================================
--- src/workflow/ArcanistTodoWorkflow.php
+++ src/workflow/ArcanistTodoWorkflow.php
@@ -47,12 +47,19 @@
'repeat' => true,
'help' => 'Other users to CC on the new task.',
),
+ 'proj' => array(
+ 'param' => 'proj',
+ 'short' => 'P',
+ 'repeat' => true,
+ 'help' => 'Assign task to this project.',
+ ),
);
}
public function run() {
$summary = implode(' ', $this->getArgument('summary'));
$ccs = $this->getArgument('cc');
+ $projs = $this->getArgument('proj');
$conduit = $this->getConduit();
if (trim($summary) == '') {
@@ -77,6 +84,26 @@
}
$args['ccPHIDs'] = $phids;
}
+ if (!$projs) {
+ $default_project = $this->getConfigFromAnySource('todo.default_project');
+ if ($default_project) {
+ $projs[] = $default_project;
+ }
+ }
+ if ($projs) {
+ $phids = array();
+ $projects = $conduit->callMethodSynchronous(
+ 'project.query',
+ array(
+ 'status' => 'status-active',
+ ));
+ foreach ($projects as $phid => $info) {
+ if (in_array($info['name'], $projs)) {
+ $phids[] = $info['phid'];
+ }
+ }
+ $args['projectPHIDs'] = $phids;
+ }
$result = $conduit->callMethodSynchronous(
'maniphest.createtask',
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 24, 10:42 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6713932
Default Alt Text
D7446.id.diff (1 KB)
Attached To
Mode
D7446: Added project option and default to todo workflow
Attached
Detach File
Event Timeline
Log In to Comment