Is there a way to get all subitems from a board between specific creation dates?

Your help is much appreciated.

I am very new to this and have been searching and trying different ways with success. Is there a way to query all subitems from a board between specific create dates?

hi @jyuc

I don’t think that is possible with just one query. The items_page is where you can filter for column values (like date), but that works on items (not subitems). The good news is: subitems are just items on another board. You can retrieve the boardId where those subitems live with:

{
  boards(ids: 123456789) {
    columns (ids: "subitems") {
      settings_str
    }
  }
}

where 123456789 is the id of your board holding the items and subitems. This will return a settings_str in the form:

{\"allowMultipleItems\":true,\"itemTypeName\":\"column.subtasks.title\",\"displayType\":\"BOARD_INLINE\",\"boardIds\":[987654321]}"

which contains the boardId of the board where the subitems live, in this case 987654321. Now you can query that board and filter for dates with:

{
  boards(ids: 987654321) {
    items_page(
      limit: 100
      query_params: {rules: [{column_id: "date0", compare_value: ["2023-11-23", "2023-11-25"], operator: between}]}
    ) {
      cursor
      items {
        name
        column_values {
          id
          value
        }
      }
    }
  }
}

So, basically an items query on the board holding the subitems :slight_smile:.