Is there a way to set the Responsible value as Group/User in a ticket creation via API?

Hello,

Is there a way to set the responsible as group/user when creating a ticket via API? I tested a ticket create call and passed both the ResponsibleGroupID and the ResponsibleUid, but it is only setting the ticket to the ResponsibleUid value and not displaying the group. It seems to work when I do an initial call to create the ticket with the group and then do an additional call to edit the ticket and only send the ResponsibleUid. The ticket then displayed the responsible as group/user. 

Thanks.

Phuong

Asked by Phuong Hoang on Mon 7/25/22 4:12 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Tue 7/26/22 10:46 AM

Hello Phuong,

The ticket will set the responsibility to the primary group / user if you pass only the ResponsibleUID and if that person has a Primary Group designated on their account.

Otherwise, were you passing a group ID that the responsible person was a member of? If no, I also would not expect that to work.

No feedback
Hi Mark,

We don't use Primary Group, so that wouldn't work. I tested with myself and passed a groupID that I am a member of, along with my UID. I tried again just now and it would only display me as the responsible.

Thanks.
Phuong
- Phuong Hoang Tue 7/26/22 10:53 AM
I think this is expected actually. I state that because the only way a group gets associated with a ticket is if A) they are the Primary group of the first person assigned to the ticket, B) they were the first group assigned to the ticket, and all subsequent user assignments to the ticket are still members of that group, or C) the ticket was specifically later assigned to the group directly at some point after ticket creation.

If the ticket were completely unassigned, since you do not have a Primary group, when you would manually take responsibility for it no group you are a member of would be displayed next to your name by default. The group would first have to be assigned to the ticket, *then* a user within that group would need to be assigned to the ticket directly for the "Sticky" assignments feature to maintain the connection to the group.
- Mark Sayers Tue 7/26/22 1:27 PM
From an API perspective, you're basically saying you have to do exactly that same sequence to get the group to display, ie. assign the ticket to the group, then assign it to yourself/the desired user. - Mark Sayers Tue 7/26/22 1:27 PM
OK makes sense. Thanks. - Phuong Hoang Tue 7/26/22 5:32 PM