-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add support for custom fields (lookup fields) #139
Conversation
+ Added lookup custom field type with type integer.
3d1d457
to
9223de6
Compare
+ Added lookup custom field type with type integer.
+ Added lookup custom field type with type integer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the new field to the all_fields test?
This is not exactly a new field, but rather a custom field type, and I have setup lookup fields on few streams to validate lookup datatype. I was thinking to add a new test case for the following reason:
@cosimon what are your thoughts about adding a new test? |
Let me know if I can be of any assistance. |
I have made some changes as suggested, once the team reviews and approves this change, i will merge this P.R. |
tap_zendesk/streams.py
Outdated
json_type = CUSTOM_TYPES.get(zendesk_type) | ||
if json_type is None: | ||
raise Exception("Discovered unsupported type for custom field {} (key: {}): {}" | ||
.format(field.title, | ||
field.key, | ||
zendesk_type)) | ||
json_type = "string" | ||
LOGGER.critical("Discovered unsupported type for custom field %s (key: %s): %s", | ||
field.title, field.key, zendesk_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json_type = CUSTOM_TYPES.get(zendesk_type) | |
if json_type is None: | |
raise Exception("Discovered unsupported type for custom field {} (key: {}): {}" | |
.format(field.title, | |
field.key, | |
zendesk_type)) | |
json_type = "string" | |
LOGGER.critical("Discovered unsupported type for custom field %s (key: %s): %s", | |
field.title, field.key, zendesk_type) | |
if zendesk_type not in CUSTOM_TYPES: | |
LOGGER.critical("Discovered unsupported type for custom field %s (key: %s): %s", | |
field.title, field.key, zendesk_type) | |
json_type = CUSTOM_TYPES.get(zendesk_type) or "string" |
Co-authored-by: Rushikesh Todkar <[email protected]>
test/test_all_streams.py
Outdated
@@ -111,7 +111,7 @@ def rate_tickets(self, records): | |||
#zenpy_client.tickets.rate(id, rating) # example rating {'score': 'good'} | |||
|
|||
|
|||
@ZendeskTest.skipUntilDone("TDL-20862") | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra line here and other similar locations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some some suggestions, also since we are working on these test, this is good opportunity to replace print
statements by tap_tester LOGGER
.
Description of change
Manual QA steps
Risks
Rollback steps
Why
interger
type for lookup fields and notstring
Ans: here
Co-author - @lukas-gust