'When a Task is created:
* Process the additional fields: Project/Activity/Milestone
* create associated Link Table records
* notify assignee'

@staticmethod
def project_task_create_onaccept(form):

    db = current.db
    s3db = current.s3db
    session = current.session
    task_id = form.vars.id
    if session.s3.incident:
        etable = s3db.event_task
        etable.insert(incident_id=session.s3.incident, task_id=task_id)
    ltp = db.project_task_project
    post_vars = current.request.post_vars
    project_id = post_vars.get('project_id')
    if project_id:
        link_id = ltp.insert(task_id=task_id, project_id=project_id)
    activity_id = post_vars.get('activity_id')
    if activity_id:
        lta = db.project_task_activity
        link_id = lta.insert(task_id=task_id, activity_id=activity_id)
    milestone_id = post_vars.get('milestone_id')
    if milestone_id:
        ltable = db.project_task_milestone
        link_id = ltable.insert(task_id=task_id, milestone_id=milestone_id)
    row = db((ltp.task_id == task_id)).select(ltp.project_id, limitby=(0, 1)).first()
    if (not row):
        lta = db.project_task_activity
        ta = db.project_activity
        query = ((lta.task_id == task_id) & (lta.activity_id == ta.id))
        row = db(query).select(ta.project_id, limitby=(0, 1)).first()
        if (row and row.project_id):
            ltp.insert(task_id=task_id, project_id=row.project_id)
    task_notify(form)
