This request is affected by the New Goal Memberships Deprecation for Stories on a Task

Running the code below gives me the error

$client = Client::accessToken(env('ASANA_PERSONAL_ACCESS_TOKEN'));
        $stories  = $client->stories->getStoriesForTask('1207356230715747');
        foreach ($stories as $story) {
            print($story->text);
        }

This request is affected by the “new_goal_memberships” deprecation. Please visit this url for more info: [Launched] Team-Sharing for Goals Adding “new_goal_memberships” to your “Asana-Enable” or “Asana-Disable” header will opt in/out to this deprecation and suppress this warning.

How can I resolve this

I am accessing this through the latest version of the PHP SDK

This is what you have to do, the API documentation has a section on Enable/Disable.

But this is only a warning, your call should not fail.

Even when I add that to the client it still fails

$client = Client::accessToken(env('ASANA_PERSONAL_ACCESS_TOKEN', [
            'headers' => [
                'asana-enable' => 'new_goal_memberships,new_memberships',
            ],
        ]));

And I do get an exception not a warning see screenshot

I think something else fishy is going on here, as it doesn’t make sense to me that an endpoint involving stories on a task should have anything to do with goals. @John_Baldo @David_Neal maybe you could check into this?

1 Like

Good morning, brining this back to the top of your mailboxes for any advice and/or suggestions on workarounds

Thank you in advance