Closed billnoom closed 2 months ago
This issue/PR is stale because it has been opened 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
@billnoom sorry for the delay. I tried to reproduce with no luck:
// this works properly and opens a ticket with an initial "My initial comment" that is public
public static void main(String[] args) {
try(var zd = new Zendesk.Builder("**")
.setUsername("**")
.setToken("**")
.build()) {
Ticket ticket = new Ticket();
ticket.setRequester(new Ticket.Requester("**", "**"));
Comment comment = new Comment("My initial comment");
comment.setPublic(true);
ticket.setComment(comment);
ticket.setDescription("Some description");
ticket.setSubject("[Zendesk Java Client] Reproducer for gh-706");
zd.createTicket(ticket);
}
}
I noticed reading through your sample that you are not calling directly the zendesk java client, which makes me think you have some additional logic in your wrapper that might explain the discrepancy we see.
Thanks for taking a look! I ended up finding a work around. I think your assessment is correct; there's likely some additional logic in our wrapper that was causing an issue.
Great, thanks for the feedback!
Describe the bug When creating a ticket, if a
Comment
is set to public (usingsetPublic(true)
), the comment isn't actually set to public when the ticket is created.To Reproduce
The comment created with this ticket does not have the "public" attribute set to true.
Turning on "debug" logging, we can see the comment in the JSON request has "public" set to
false
.Expected behavior We would expect the comment flagged as public to be public.
It should be noted that if you first create the ticket then create a separate request to create a comment (with the comment set to public), that it actually works as expected (the comment is created with the public flag set to true).
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): N/A
Smartphone (please complete the following information): N/A