Cannot use 'label' with a Status column & create_item mutation

Hi there, I want to add an item using the following mutation:

mutation ($bid: Int!, $gid: String!, $name: String!, $cnames: JSON!) {
  create_item(board_id: $bid, group_id: $gid, item_name: $name, column_values: $cnames) {
    id
    state
    created_at
    creator {
      id
      name
    }
    column_values {
      id
      value
      text
    }
  }
}

I have a problem with a status column: if using an index to specify the desired status, it’s fine:

{
  "bid": 343506767,
  "gid": "new_group",
  "name":"item created using APIv2",
  "cnames": "{\"link\" : {\"url\":\"http://www.monday.com\",\"text\":\"Monday\"}, \"id1\":\"123456789\", \"status\" : { \"index\" : \"1\" }}"
}

If I try to set the column status using a label, the status value I pass to the mutation is ignored all-together, the default value is assigned to the column. Here’s an example of the variables I’m using for the second query:

{
  "bid": 343506767,
  "gid": "new_group",
  "name":"item created using APIv2",
  "cnames": "{\"link\" : {\"url\":\"http://www.monday.com\",\"text\":\"Monday\"}, \"id1\":\"123456789\", \"status\" : { \"label\" : \"Done\" }}"
}

Is this a bug or intended behavior ? In both cases the API returns be a new item, no errors are reported in the response.

Hey @gianluigi – thanks for your post.

Great catch, this is indeed a bug. At the moment, you cannot populate a status column by label upon item creation (only by ID). :bug:

We’re aware of this and working on it though! In the meantime, I’d suggest either using the status index to populate the column values, or make an “update_column_value” mutation to add the status by label.

Let me know if you have further questions on this! :+1:
Dipro