Error in updating columns of sub-items

Good afternoon, I’m having a problem with a subitem update, my idea is to update the status column of the subitems, I’m doing a query after creating the subitems.
My query to get the ids of the subitems:

 'query($itemId: [Int]){
  Items (ids: $itemId) {
    Column_values ​​{
      Id
      Text
      Value
    }
  }
}'

The answer:
‘{
LinkedPulseIds: [
{ linkedPulseId: 1400012779 },
{ linkedPulseId: 1400012848 },
{ linkedPulseId: 1400012918 },
{ linkedPulseId: 1400012997 },
{ linkedPulseId: 1400013068 },
{ linkedPulseId: 1400013123 },
{ linkedPulseId: 1400013255 },
{ linkedPulseId: 1400013310 },
{ linkedPulseId: 1400013366 },
{ linkedPulseId: 1400013404 },
{ linkedPulseId: 1400013480 }
]
}’
Right after that I try to mutate with the ids:
‘mutation($value: JSON!, $idColumn: String!) {change_column_value( board_id:1249559661
Column_id: $idColumn item_id: $idSubitem value: $value) {id}}’

The answer :
‘{
Error_code: ‘ResourceNotFoundException’,
Status_code: 404,
Error_message: ‘Item not found in board’,
Error_data: { item_id: 1400013480, board_id: 1249559661, error_reason: null }
}’
Can you help me?
Thanks!

Hey @franklin.oliveira
You are trying to update subitem under the original board, but subitems are actually created under different board with different board id
You can query this board id from the settings of the subitem column of the original board

query{
  boards(ids: 1249559661){
    columns{
      id
      settings_str
    }    
  }
}

The result will be something like this:

{
            "id": "subitems",
            "settings_str": "{\"allowMultipleItems\":true,\"itemTypeName\":\"column.subtasks.title\",\"displayType\":\"BOARD_INLINE\",\"boardIds\":[1249559701]}"
          }

Where 1249559701 - is the id of your subitems board

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.