Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_project and custom_fields don't quite work together #165

Open
jaymzh opened this issue Apr 10, 2023 · 0 comments
Open

create_project and custom_fields don't quite work together #165

jaymzh opened this issue Apr 10, 2023 · 0 comments

Comments

@jaymzh
Copy link

jaymzh commented Apr 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant