Skip to content

Add VoiceComment sub-type - #697

Merged
PierreBtz merged 1 commit into
cloudbees-oss:masterfrom
besbes:feature/voicecomment
Jun 24, 2024
Merged

Add VoiceComment sub-type#697
PierreBtz merged 1 commit into
cloudbees-oss:masterfrom
besbes:feature/voicecomment

Conversation

@besbes

@besbes besbes commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

In our project we need to access data about voice calls, which are represented by Zendesk as comments with a type VoiceComment (I added the discriminating property in #415 ). This PR adds a VoiceComment subclass which exposes the data attribute which in turn contains some additional information about voice comments (see Adding voice comments to tickets. In particular we need to access the call_duration attribute, hence this is the only one that is added at the moment.

Please let me know if you think we should add more (all?) attributes, as well as how to best test this. Thank you!

@besbes
besbes requested review from PierreBtz and duemir as code owners June 3, 2024 16:06
@besbes
besbes force-pushed the feature/voicecomment branch from 8f3c300 to 3e332f1 Compare June 3, 2024 16:11
@PierreBtz

Copy link
Copy Markdown
Collaborator

@besbes thanks for the contribution. I cannot find anywhere on the Zendesk API the exact format of a comment object. in #415 it was determined it was the same as a "normal" comment (#415 (comment)), but I don't see any data field in the comment object. How did you determine this field? Did you find some doc or you just looked at the json?

@besbes

besbes commented Jun 24, 2024

Copy link
Copy Markdown
Contributor Author

@PierreBtz Yes… the Zendesk docs are rather weak for this specific case. I looked at the JSON returned from the Zendesk API and there I could see the data field for every voice comment I was looking at. There are more attributes included in the data field next to call_duration but this one is the only one we need right now so I omitted the other ones. Let me know if you want me to add more fields (just FYI, other fields include from and to (phone numbers), recording_url, call_id, location, answered_by_id etc.).

@PierreBtz

Copy link
Copy Markdown
Collaborator

@besbes all good. Since you tested your specific case and we have a basic test to cover the more generic comment case, I'll go ahead and merge as is.

Thanks for the contribution!

@PierreBtz
PierreBtz merged commit 36dc24c into cloudbees-oss:master Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants