[Improved] Variables assignees in project templates

Original announcement

Summary

We are thrilled to announce a significant enhancement to our API that will empower you to take your workflow management to the next level: variable assignee support, otherwise known as requested_roles, has been added to the API. This update brings extensibility to how you handle assignees in your projects.

Usage

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

The following endpoints have been updated to support variable assignees, using the “requested_roles” field:

"requested_roles": [
    {
        "gid": "1199698813650303",
        "name": "Tech Lead",
    },
    {
        "gid": "1199698813652351",
        "name": "Designer",
    }
]

When requesting project templates, a new requested_roles field will be returned, containing a list of roles.

"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 now specify the requested_roles field, allowing you to pass in an array of roles mapped to specific users. The value field indicates which user should be assigned to the corresponding role.

For more information on requested_roles, check out the schemas for project templates.

Questions & feedback

This update opens up new possibilities for your applications, enabling you to dynamically assign roles and streamline your project management processes.

We can’t wait to see how you leverage this new feature in your applications! If you have any questions, suggestions, or need further guidance, feel free to share your thoughts with the community. Your feedback is essential, and we’re here to support your development efforts.

Best,
Andrew

2 Likes

This is a great piece of functionality, but I’ve found an issue - in circumstances where I want to assign 1 user to 2 or more project roles, it only assigns the user to the 1st role. The 2nd role is unassigned on all relevant tasks, even though a user value has been provided.

Is this a known issue?

Thanks,

Alex.

Hi Alex,

Thanks for flagging the issue you’ve encountered! Could you please share the request body you are sending to this endpoint? I’ve just tried to replicate this behavior, but for the following template:

{
  "data": {
    "gid": "PROJECT_TEMPATE_GID",
    "resource_type": "project_template",
    "name": "[Template] Example Project",
    "requested_roles": [
      {
        "gid": "ROLE_A_GID",
        "name": "Role A"
      },
      {
        "gid": "ROLE_B_GID",
        "name": "Role B"
      }
    ]
  }
}

I was able to successfully assign the same user to both roles using this request body:

{
  "data": {
    "name": "Example Project",
    "requested_roles": [
      {
        "gid": "ROLE_A_GID",
        "value": "me"
      },
      {
        "gid": "ROLE_B_GID",
        "value": "me"
      }
    ]
  }
}

Best,
Dominik

Hi Dominik,

In copying the body into this response, I found the error of my ways - for the two role names in my templates, I was passing the same role name twice, instead of the 1st & 2nd role name. Amended and all working as expected now, same user assigned to two separate roles.

Many Thanks,
Alex.

1 Like