mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Update various Asana odds-and-ends for "gid" API changes
Summary: Ref T13453. Some of the Asana integrations also need API updates. Depends on D20899. Test Plan: - Viewed "asana.workspace-id" in Config, got a sensible GID list. - Created a revision, saw the associated Asana task get assigned. - Pasted an Asana link I could view into a revision description, saw it Doorkeeper in the metadata. Maniphest Tasks: T13453 Differential Revision: https://secure.phabricator.com/D20900
This commit is contained in:
parent
2223d6b914
commit
cd60a8aa56
3 changed files with 13 additions and 7 deletions
|
@ -123,8 +123,11 @@ final class DoorkeeperBridgeAsana extends DoorkeeperBridge {
|
|||
}
|
||||
|
||||
public function fillObjectFromData(DoorkeeperExternalObject $obj, $result) {
|
||||
$id = $result['id'];
|
||||
$uri = "https://app.asana.com/0/{$id}/{$id}";
|
||||
$gid = $result['gid'];
|
||||
$uri = urisprintf(
|
||||
'https://app.asana.com/0/%s/%s',
|
||||
$gid,
|
||||
$gid);
|
||||
$obj->setObjectURI($uri);
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,10 @@ final class PhabricatorAsanaConfigOptions
|
|||
pht('Workspace Name'));
|
||||
$out[] = '| ------------ | -------------- |';
|
||||
foreach ($workspaces as $workspace) {
|
||||
$out[] = sprintf('| `%s` | `%s` |', $workspace['id'], $workspace['name']);
|
||||
$out[] = sprintf(
|
||||
'| `%s` | `%s` |',
|
||||
$workspace['gid'],
|
||||
$workspace['name']);
|
||||
}
|
||||
|
||||
$out = implode("\n", $out);
|
||||
|
|
|
@ -358,7 +358,7 @@ final class DoorkeeperAsanaFeedWorker extends DoorkeeperFeedWorker {
|
|||
'POST',
|
||||
$subtask_data + array(
|
||||
'assignee' => $phid_aid_map[$user_phid],
|
||||
'completed' => $is_completed,
|
||||
'completed' => (int)$is_completed,
|
||||
'parent' => $parent_ref->getObjectID(),
|
||||
));
|
||||
|
||||
|
@ -393,7 +393,7 @@ final class DoorkeeperAsanaFeedWorker extends DoorkeeperFeedWorker {
|
|||
'PUT',
|
||||
$subtask_data + array(
|
||||
'assignee' => $phid_aid_map[$user_phid],
|
||||
'completed' => $is_completed,
|
||||
'completed' => (int)$is_completed,
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -484,7 +484,7 @@ final class DoorkeeperAsanaFeedWorker extends DoorkeeperFeedWorker {
|
|||
return array(
|
||||
'name' => $title,
|
||||
'notes' => $notes,
|
||||
'completed' => $is_completed,
|
||||
'completed' => (int)$is_completed,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,7 @@ final class DoorkeeperAsanaFeedWorker extends DoorkeeperFeedWorker {
|
|||
->setApplicationType(DoorkeeperBridgeAsana::APPTYPE_ASANA)
|
||||
->setApplicationDomain(DoorkeeperBridgeAsana::APPDOMAIN_ASANA)
|
||||
->setObjectType($type)
|
||||
->setObjectID($result['id'])
|
||||
->setObjectID($result['gid'])
|
||||
->setIsVisible(true);
|
||||
|
||||
$xobj = $ref->newExternalObject();
|
||||
|
|
Loading…
Reference in a new issue