diff --git a/src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php b/src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php index 05ee786337..59c3e4026d 100644 --- a/src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php +++ b/src/applications/doorkeeper/bridge/DoorkeeperBridgeAsana.php @@ -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); } diff --git a/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php b/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php index 1771a6615e..3a9c9abac5 100644 --- a/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php +++ b/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php @@ -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); diff --git a/src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php b/src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php index 1d293956b3..00b75b7a56 100644 --- a/src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php +++ b/src/applications/doorkeeper/worker/DoorkeeperAsanaFeedWorker.php @@ -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();