Skip to content

create_project and custom_fields don't quite work together #165

@jaymzh

Description

@jaymzh

In theory, when you create a project you can pass in a set of custom_fields as $CUSTOM_FIELD_GID => $VALUE.

In practice, those custom fields aren't available on the object until after it's associated with a /portfolio/ via add_item_for_portfolio.

This means you need to:

res = create_project(...)
add_item_for_porfolio(portfolio_gid: gid, item: res.gid)
update_project(...)

This isn't inherently ruby-asanas fault, since the underlying REST API claims this should work, but it does not. Ideally, the API would take a portfolio_gid argument to create_project, which it would then associate the project to so it could create the appropriate custom_field values.

However, in much the same way that the ruby-asana library kindly handles pagination and other things for us transparently in the background, perhaps in the meantime, create_project could get a portfolio_gid, and then do this 3-step dance for the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions