Skip to main content

Hi all,


I have a board with the following columns:



The dev assignee and Reporter columns are of type “multiple-person” and with id of “person”.


I am having a person’s id, which I’m trying to insert in the followingway:


mutation {
create_item(
board_id: 3782143770,
item_name: "New ItemZzzZ",
column_values: "{\\"multiple-person\\":{\\"person\\":\{\\"id\\":\\"36904156\\"}]}}") {
id
name
}
}

I get a new item being created with correct title, but the assigned person is the first person in the alphabetic order, no matter what person id i put inside.


So, yeah, I’m quite struggling with inserting a person into the multiple-person column, and I couldn’t find anything in the web which was actually working for my case.


Any ideas?


Regards! :_)

Hello there @danieln and welcome to the community!


I hope you like it here 💪


We have columns of type “person” and of type “people”. The “person” column type is deprecated so you should use “people”.


If this is a “people” column, which is the most likely scenario, you can create the item with the populated column value like this:


mutation {
create_item(board_id: 1234567890, item_name: "My item", column_values: "{\\"people1\\": \\"matias@example.com\\"}") {
id
}
}

or like this:


mutation {
create_item(board_id: 1234567890, item_name: "My item", column_values: "{\\"people1\\": {\\"personsAndTeams\\":"{\\"id\\":12340000,\\"kind\\":\\"person\\"}]}}") {
id
}
}

Let us know how that goes!



Hi Matias. Thanks for your help!


I am attempting to enter the user using the person’s id, in the following way (based on your response):


mutation {
create_item(board_id: 3712123731, item_name: "My iteM froM api", column_values: "{\\"people\\": \\"36914456\\"}") {
id
}
}

yet it doesn’t add the person to the newly created item. was the mutation correct?

(considering the column id which i’m attempting to add a value to is “person”)


tried also the second option in the following way:


mutation {
create_item(board_id: 3782143770, item_name: "My item", column_values: "{\\"people\\": {\\"personsAndTeams\\":d{\\"id\\":36904156,\\"kind\\":\\"person\\"}]}}") {
id
}
}

regards!


Hi @danieln,


When sending the column_values array, e.g:


column_values: "{\\"people\\": {\\"personsAndTeams\\":[{\\"id\\":36904156,\\"kind\\":\\"person\\"}]}}"

you’ll want to change the first reference to “people”, since your column ID is person, to instead send:


column_values: "{\\"person\\": {\\"personsAndTeams\\":m{\\"id\\":36904156,\\"kind\\":\\"person\\"}]}}"

Let me know if this works for you!



Hi :_)


I have tried the following:


mutation {
create_item(
board_id: XXXXXXXXX,
item_name: "testing",
column_values: "{\\"person2\\":{\\"personsAndTeams\\":[{\\"id\\":\\"36904156,\\"kind\\":\\"person\\"}]}}") {
id
name
}
}

but I get the answer:



{

“error_message”: “439: unexpected token at ‘{"id":"36904156,"kind":"person"}]}}’”,

“status_code”: 500

}



Thanks for helping.


Hello again @danieln,


Your query was missing a backslash and a quote after the user ID. Here it is fixed (I tested it here and it is working):


mutation {
create_item(board_id: XXXXXXXXX, item_name: "testing", column_values: "{\\"person2\\":{\\"personsAndTeams\\":[{\\"id\\":\\"36904156\\",\\"kind\\":\\"person\\"}]}}") {
id
name
}
}

I hope that helps!


Cheers,

Matias


Working! Thank you, thank you, thank you! I went insane already.


Reply