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

TDL-26578 Fix custom field date time schema #151

Open
wants to merge 2 commits into
base: TDL-24687/enhance-tap-performance
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog

## 2.5.0
## 3.0.0
* Performance improvement on ticket records sync [#150](https://github.com/singer-io/tap-zendesk/pull/150)
* Fix custom `date` types to use correct json schema format [#151](https://github.com/singer-io/tap-zendesk/pull/151)

## 2.4.0
* Upgrades to run on python 3.11.7 [#146](https://github.com/singer-io/tap-zendesk/pull/146)
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='tap-zendesk',
version='2.5.0',
version='3.0.0',
description='Singer.io tap for extracting data from the Zendesk API',
author='Stitch',
url='https://singer.io',
Expand All @@ -21,8 +21,9 @@
'ipdb',
],
'test': [
'pylint==3.0.3',
'aioresponses',
'nose2',
'pylint==3.0.3',
'pytest'
]
},
Expand Down
2 changes: 1 addition & 1 deletion tap_zendesk/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def process_custom_field(field):
json_type = CUSTOM_TYPES.get(field.type, "string")
field_schema = {'type': [json_type, 'null']}
if field.type == 'date':
field_schema['format'] = 'datetime'
field_schema['format'] = 'date-time'
if field.type == 'dropdown':
field_schema['enum'] = [o.value for o in field.custom_field_options]

Expand Down
2 changes: 1 addition & 1 deletion test/unittests/test_customfield_schema_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_return_field_type_checkbox(self):


def test_return_field_type_date(self):
expected_singer_type = {"type" : ["string", "null"], 'format': 'datetime'}
expected_singer_type = {"type" : ["string", "null"], 'format': 'date-time'}
z_field = self.get_z_field_obj("field_title_date", "field_key_date", "date")
actual_singer_type = process_custom_field(z_field)
self.assertEqual(actual_singer_type, expected_singer_type)
Expand Down