fix(mapping): make Asana_ assignee avaliable for YaTracker (except "segavol" - he has a problem)
This commit is contained in:
parent
b6016d47b3
commit
957fd6403f
10
mapping.py
10
mapping.py
@ -65,7 +65,7 @@ def transform_data(data):
|
|||||||
'description': task['notes'],
|
'description': task['notes'],
|
||||||
'createdAt': task['created_at'],
|
'createdAt': task['created_at'],
|
||||||
'deadline': task['due_on'],
|
'deadline': task['due_on'],
|
||||||
# 'assignee': task['assignee'],
|
'assignee': task['assignee'],
|
||||||
# 'milestone': task['section'],
|
# 'milestone': task['section'],
|
||||||
# 'memberships': task['memberships'],
|
# 'memberships': task['memberships'],
|
||||||
# 'parent': task[''],
|
# 'parent': task[''],
|
||||||
@ -87,7 +87,13 @@ def create_tasks_in_tracker(data):
|
|||||||
'Content-Type': 'appication/json',
|
'Content-Type': 'appication/json',
|
||||||
}
|
}
|
||||||
for task in data:
|
for task in data:
|
||||||
ya_assignee = assignee[task['assignee']['gid']] if task.get('assignee', 0) !=0 else 'dr.cyrill'
|
if task.get('assignee') and 'gid' in task['assignee']:
|
||||||
|
ya_assignee = assignee.get(task['assignee']['gid'], 'dr.cyrill')
|
||||||
|
elif task.get('assignee') == 'segavol':
|
||||||
|
ya_assignee = 'dr.cyrill'
|
||||||
|
else:
|
||||||
|
ya_assignee = 'dr.cyrill'
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
'queue': 'TESTIMPORT', # Вынести в переменную
|
'queue': 'TESTIMPORT', # Вынести в переменную
|
||||||
'summary': task['summary'],
|
'summary': task['summary'],
|
||||||
|
Loading…
Reference in New Issue
Block a user