I’d really like to set custom fields for projects i’m creating via API, rather than having to sequence calls to the ‘add custom field to project’ API call separately.
The docs for creating a project list setting "custom_fields", rather than "custom_field_settings" when creating a project.
I wasn’t aware that projects could have custom field values associated with them?!
The sample response does include "custom_field_settings" though, so I’m rather confused now.
Is this a documentation error? Am I missing something fundamental, here?
First, the docs are not wrong. In Business and Enterprise subscriptions where Portfolios exist, you can have custom fields at the Project level which are surfaced as custom field settings in Portfolios. So that’s what the custom_fields property in a Project is for.
Second, I know of no way to add custom field settings when creating a project. AFAIK you’ll have to do those separate subsequent calls that you were trying to avoid.
I’m wondering the same thing but am not as familiar with Asana’s API - What are the options to create a project with custom fields (priority) using the API?
ex: do I have to create the project then update it with custom fields?
/ what is the method using Portfolios?
Just to clarify, the add-a-custom-field-to-a-project will make a custom field available for the the tasks that live in a project. It will not enable a data stored in custom fields for a project itself.
This way of handling metadata is completely backwards in my head. If my goal is to store certain metadata for a project (let’s sa a customer_name text field) - why would I have to add that as a custom field on the portfolio level? It does’t make sense. A project can be listed in multiple portfolios, is there some good reason the metadata for the project is not stored on the project level?
While your mental model may be reasonable, I don’t think it’s fair to say Asana’s is not also valid. It has the benefit of allowing a task to accumulate custom fields defined by the projects into which it is multi-homed, and similarly allowing projects to accumulate custom fields defined by the portfolios into which they are added.