Find items assigned to a user

I’m trying to find all the items assigned to a user.

When I query a board, I get this response:

query {
  items {
    name
    column_values {
      id
      value
    }
  }
}
...
"column_values": [
      {
        "id": "person",
        "value": "{\"personsAndTeams\":[{\"id\":14983475,\"kind\":\"person\"}]}"
      },
...

But when I try and run this query to get the items by user, I get no response:

query {
items_by_column_values (board_id: 643168050, column_id: "person", column_value: "{\"personsAndTeams\":[{\"id\":14983475,\"kind\":\"person\"}]}") {
id
name
  column_values {
    id,
    title,
    value
  }
}
}

Maybe someone else can jump in on how to query based on User ID.

But, this will work to query based on User Name:

query {
items_by_column_values (board_id: 643168050, column_id: "person", column_value: "John Doe") {
id
name
  column_values {
    id
    title
    value
  }
}
}
1 Like

Hey @kylem :wave:

That’s a great question! Just to clarify, is there any chance that you have multiple assignees when querying like this? To confirm, that is currently the expected behavior, as items_by_column_values will not work for columns with more than 1 result, like the People column.

@JCorrell thanks for jumping in here! I’ve just tested this further on my end and this does work for an item with 1 assignee but doesn’t seem to provide any results for items with multiple assignees, unfortunately. But it does do the trick in general :slight_smile:

-Alex

2 Likes

Good job!

I didn’t test that.

1 Like

@JCorrell oh, of course, that’s definitely not on you to do :)! Thanks for helping out, I appreciate it.

Thanks for that insight @AlexSavchuk , pretty helpfull!

1 Like

No, the item just has a single person assigned

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