Clearing Sub Item with 'change_column_value' mutation

I am trying to clear the subitem file column with ‘change_column_value’ mutation. For the item its working good but for subitem its throwing an error ‘item not found on board’.
Same error is throwing with upload file to column also, working with item id but not working with subitem.

Here is my mutation:

mutation($boardId: ID!, $itemId: ID!, $columnId: String!, $value: JSON!) {
change_column_value(
board_id: $boardId,
item_id: $itemId,
column_id: $columnId,
value: $value
) {
id
}
}

hi @niteshjha118

Welcome to the community! What boardId are you using in your mutation? Remember that subitems “live” on another board than items. If you want to do a mutation on subitems you first have to figure out what board they “live” in. One way to find out is to run this query on the “main” board:

query{boards(ids:123456789){columns(types: subtasks){settings_str}}}

and look for the setting_str > boardIds

{
  "data": {
    "boards": [
      {
        "columns": [
          {
            "settings_str": "{\"allowMultipleItems\":true,\"itemTypeName\":\"column.subtasks.title\",\"displayType\":\"BOARD_INLINE\",\"boardIds\":[987654321]}"
          }
        ]
      }
    ]
  },
  "account_id": 123456
}```
1 Like