Mutation Subitems column value

I am trying to mutate multiple column values from a subitem with this query:
mutation {
item_id: subitemId
board_id: boardId
column_values: “{"text": "New text", "status": "Done"}”
) {

i get:

“error_code”: “ResourceNotFoundException”,
“status_code”: 404,
“error_message”: “Item not found in board”,
“error_data”: {
“resource_type”: “item”,
“item_id”: 5719698167,
“pulse_id”: 5719698167,
“board_id”: 5702744956,
“error_reason”: null
I’m not sure if this is the correct way to change the column values, or if I should provide the column values when creating the subitem (I also don’t know how this would be done).

How can I make this?

Are you using the subitem board id, or the primary board ID? Subitems actually exist on a separate board from the main board that’s hidden.

you may need to query the item for {items(ids: subitemId){board{id}} first to get the subitem board.

Another method is when creating the subitem instead of just returning the {id} instead return {id,board{id}} which will give you the board it was created on.

However, when creating a subitem, you can provide column values as JSON (you need to take your column values object and stringify it as JSON before using it in your query, and also escape quotes in that. Or look into graphql variables which will let you avoid the whole having to ensure everything is properly escaped. Setting the values on creation may not trigger column all change automations though, if you want to trigger column change automations do it in a separate query.

Thank you very much!!!
Knowing that, I have easily solved it.
What I can’t understand is why subitems are assigned a different board ID…

1 Like

Because the subitems require a different board structure (columns, their types, titles, etc.) so they used a separate board entirely for it. There is then a linked_items structure on each item that covers all the connected boards including subitems. The UI then displays those items under each item as subitems.

a little over simplified.

1 Like

Thank you @codyfrisch for the help!

1 Like