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

[3358] apply filter keep_completed_hours setting to project sync #217

Merged
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
2 changes: 1 addition & 1 deletion djautotask/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
VERSION = (1, 5, 5, 'final')
VERSION = (1, 5, 7, 'final')

# pragma: no cover
if VERSION[-1] != "final":
Expand Down
9 changes: 5 additions & 4 deletions djautotask/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def _assign_field_data(self, instance, json_data):
return instance


class TicketTaskMixin:
class CompletedDateMixin:
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
request_settings = DjautotaskSettings().get_settings()
Expand All @@ -822,7 +822,7 @@ def __init__(self, *args, **kwargs):
class TicketSynchronizer(CreateRecordMixin,
UpdateRecordMixin,
SyncRecordUDFMixin,
TicketTaskMixin,
CompletedDateMixin,
Synchronizer,
ParentSynchronizer):
client_class = api.TicketsAPIClient
Expand Down Expand Up @@ -1000,7 +1000,7 @@ def count(self, **kwargs):


class TaskSynchronizer(ChildCreateRecordMixin, SyncRecordUDFMixin,
TicketTaskMixin, BatchQueryMixin, Synchronizer):
CompletedDateMixin, BatchQueryMixin, Synchronizer):
client_class = api.TasksAPIClient
model_class = models.TaskTracker
udf_class = models.TaskUDF
Expand Down Expand Up @@ -1397,11 +1397,12 @@ class TaskSecondaryResourceSynchronizer(SecondaryResourceSynchronizer):

class ProjectSynchronizer(CreateRecordMixin, UpdateRecordMixin,
SyncRecordUDFMixin, Synchronizer,
ParentSynchronizer):
ParentSynchronizer, CompletedDateMixin):
client_class = api.ProjectsAPIClient
model_class = models.ProjectTracker
udf_class = models.ProjectUDF
last_updated_field = 'lastActivityDateTime'
completed_date_field = 'completedDateTime'

related_meta = {
'projectLeadResourceID': (models.Resource, 'project_lead_resource'),
Expand Down
Loading