Closed nerg4l closed 3 weeks ago
Sorry it took so long to get back to you! I will do some investigation and partner with you on this. I feel it's a miss on the part of the API if Agent Workspace can do it, yet it's not exposed here. Very interesting :) Furthermore, I wonder if the Ruby SDK also has this "miss" as you lay it out. If it does, we should probably add it there as well. Comment redaction is very important and allows our customers to shore up any PII/Confidentiality misses. Thanks for pointing it out, again, I'll do a bit of research today.
OK, after confirming your findings, I feel that
zenpy_client.comment_redact
Should be added. If you make a PR, I'll contribute and ensure there's a test. Would love to work with you on this.
I can work on this next week.
I started to work on it, but so far, I couldn't get a successful response from Zendesk. I keep receiving 400 Bad Request.
Oh, I missed this. Regardless, it seems the current implementation can only redact text and not attachments.
@cryptomail Okay, now I remember why I had to add #646. The current implementation calls a different endpoint which behaves differently and cannot redact from closed tickets.
Current Redact String in Comment
PUT /api/v2/tickets/{ticket_id}/comments/{ticket_comment_id}/redact
[...] Once a ticket is closed, you can no longer redact strings from its comments. [...]
Proposed Redact Ticket Comment In Agent Workspace
PUT /api/v2/comment_redactions/{ticket_comment_id}
This endpoint provides all the same functionality that the Redact String in Comment endpoint provides, plus:
- Redaction of comments in closed tickets
- Redaction of comments in archived tickets
- Redaction of formatted text (bold, italics, hyperlinks)
@cryptomail is there any chance to reopen this based on my previous comment?
There are two ways to redact comments.
One of them, "Redact String in Comment" is already implemented, but that functionality cannot redact information from closed tickets.
However, "Redact Ticket Comment In Agent Workspace" does not have this limitation.
I'm willing to create a PR with this functionality but I would like to know how this should be exposed.
zenpy_client.tickets.comment_redact
is already in use for redacting strings. Should it be added aszenpy_client.comment_redact
?