Custom fields specific to a project, not workspace

Hi! Thanks for the reply!

It gave me something to search the forum with and I’ve found the solution in these two topics:

The gist is, you need to send a POST to addCustomFieldSetting just like in the docs, but instead of setting custom_field to an existing GID, you pass a JSON definition of a custom field.

In my case, when using the Node API, it looks something like this:

client.projects.addCustomFieldSettingForProject(
  project.gid, { 
    custom_field: { 
      name: 'Test Custom Field', 
      type: 'enum', 
      enum_options: [{ name: 'first' }, { name: 'second' }], 
      "resource_subtype": "enum"
    },
  is_important: true 
});

Afterwards, the added custom field is visible in the project’s custom_field_settings.

1 Like