How do I set a custom checkbox field in Zendesk please?

Originally asked by George Smith on 24 May 2023 (original question)



Comments:

Kazim Yildirim commented on 26 May 2023

Hi,

I took your code and changed the ID.

In the beginning the value is set to true and then it is removing again (old community)

Really strange (old community)

Do you have an idea?

Kazim Yildirim commented on 26 May 2023

In the Zendesk Events you can see two actions, and I do not know why…
First it is setting on yes and then in a second step to no

Syed Majid Hassan commented on 26 May 2023

Kazim Yildirim can you please share the exact code that you have in the incoming

Answer by Syed Majid Hassan on 24 May 2023

Hi,

The following works for me:

def res = httpClient.put("/api/v2/tickets/${issue.key}.json", """
{
"ticket": {
"custom_fields": [
{
"id": 13952392909585,
"value": true
}
]
}
}
"""
)

Here you need to replace the id with the correct field ID that you are trying to work on.

Also, the value is right now set as true. Here you can use the mapping you created to reference it and set the correct value (from the replica).

Thanks

Majid


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