Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to create a private Ticket #232

Closed
manda986 opened this issue May 3, 2018 · 3 comments
Closed

Not able to create a private Ticket #232

manda986 opened this issue May 3, 2018 · 3 comments
Labels

Comments

@manda986
Copy link

manda986 commented May 3, 2018

Hi there! I'm looking to create a private Ticket on behalf of a user. However, it seems that calling the tickets.create() method with is_public=False doesn't set that field, and it ends up sending an email to that user (which I don't want). I want to avoid having to set a submitter. Here's a sample call:

zenpy_client.tickets.create(
        Ticket(
            subject="Ticket created for John Smith",
            description="foo",
            is_public=False, 
            requester=User(name="John Smith", email="john.smith@foo.com"))
    )

Thanks in advance!

@ilovelofi
Copy link

Even setting the submitter as an admin, it doesn't seem possible to make the description private with Zenpy. Any tips?

@facetoe
Copy link
Owner

facetoe commented May 4, 2018

Hi,

You can achieve this as follows:

zenpy_client.tickets.create(Ticket(subject='something', comment=Comment(body='somethingsomthing', public=False)))

Hope this helps.

@facetoe
Copy link
Owner

facetoe commented May 4, 2018

BTW, is_public is read only and means something a bit different (https://developer.zendesk.com/rest_api/docs/core/tickets):

Is true if any comments are public, false otherwise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants