[GA] Variable Assignees

tl;dr:

  • :rocket: :green_circle: : Generally Available!
  • supply requested_roles when instantiating a project from a project template
    • aka “variable assignees”
  • generally available on 2023-02-22

Hey folks,

Variable assignee support has been added to the API! The resources for the
following endpoints have changed to support variable assignees. In the API, this
is called requested_roles:

  • GET /project_templates/{project_template_gid}

    "requested_roles": [
        {
            "gid": "1199698813650303",
            "name": "Tech Lead",
        },
        {
            "gid": "1199698813652351",
            "name": "Designer",
        }
    ]
    
    • when requesting project templates, a new requested_roles field will be
      returned which includes a list of roles.
  • POST /project_templates/{project_template_gid}/instantiateProject

    "requested_roles": [
        {
            "gid": "1199698813652351",
            "value": "1201974226015987" // User ID for the Designer role
        },
        {
            "gid": "1199698813650303",
            "value": "1201974226011942" // User ID for the Tech Lead role
        }
    ]
    
    • when instantiating a project from a template, you can optionally
      specify the requested_roles field and pass in an array of roles mapped
      to users. The value field indicates which user should be used be
      assigned to the role.

Unchanged Behavior

If you do not specify requested_roles, or if some of the requested roles are
unset, the behavior will remain as it is today, and tasks will remain
unassigned.

Timeline

  • Generally Available: 2023-02-22

Yours in Developer Relations,
Sasha, on behalf of the Asana API Team

6 Likes

Awesome, thanks @sasha_f!

This opens great possibilities.
Thanks for the update.

Great thanks.