Skip to content

Commit

Permalink
Merge pull request #217 from KerkhoffTechnologies/3358-in-django-auto…
Browse files Browse the repository at this point in the history
…task-apply-keep_completed_hours-setting-to-project-sync

[3358] apply filter keep_completed_hours setting to project sync
  • Loading branch information
kti-sam authored May 27, 2024
2 parents 3d251ac + 66c77bd commit 81ed2fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit 81ed2fe

Please sign in to comment.