def to_yt_sub_task(target, project_id, story, task):
    issue = Issue()
    issue.summary = task[u'text']
    issue.reporterName = story[u'creator'][u'userName']
    issue.created = str(to_unix_date(task[u'createTime']))
    if u'finishTime' in task:
        issue.resolved = str(to_unix_date(task[u'finishTime']))
    status = task[u'status']
    add_value_to_custom_field(target, project_id, "Status", status)
    issue['Status'] = status
    issue['Type'] = 'Task'
    if u'finishedBy' in task:
        finished_by = task[u'finishedBy']
        import_user(target, finished_by)
        issue['Assignee'] = finished_by[u'userName']
    issue.comments = []
    return issue

#def to_yt_issue(target, project_id, task):
#    pass
dataset/ETHPy150Open JetBrains/youtrack-rest-python-library/python/agilezen2youtrack.py/to_yt_sub_task/original