Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F79546
D7446.diff
All Users
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.diff
View Options
diff --git a/src/workflow/ArcanistTodoWorkflow.php b/src/workflow/ArcanistTodoWorkflow.php
--- a/src/workflow/ArcanistTodoWorkflow.php
+++ b/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/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/dg/jv/wrfinhtj52i2zpqx
Default Alt Text
D7446.diff (1 KB)
Attached To
Mode
D7446: Added project option and default to todo workflow
Attached
Detach File
Event Timeline
Log In to Comment