コード例 #1
0
def build_user_row(transact_guid, users_dict):
    users_row = {}
    users_row['Guid'] = transact_guid
    users_row['Id'] = 'NULL' if not fnx.is_key_in_dictionary(
        users_dict, 'id') else users_dict['id']
    users_row['FirstName'] = '' if not fnx.is_key_in_dictionary(
        users_dict, 'firstName') else users_dict['firstName']
    users_row['LastName'] = '' if not fnx.is_key_in_dictionary(
        users_dict, 'lastName') else users_dict['lastName']
    users_row['UpdatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(
        users_dict, 'updatedOn') else users_dict['updatedOn']
    users_row['CreatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(
        users_dict, 'createdOn') else users_dict['createdOn']
    return users_row
コード例 #2
0
def build_release_row(transact_guid,release_dict):
    release_row={}
    release_row['Guid'] = transact_guid
    release_row['Id'] = 'NULL' if not fnx.is_key_in_dictionary(release_dict,'id') else release_dict['id']
    release_row['Title'] = '' if not fnx.is_key_in_dictionary(release_dict,'title') else release_dict['title']
    release_row['CreatedById'] = 'NULL' if not fnx.is_key_in_dictionary(release_dict,'owner','id') else release_dict['owner']['id']
    release_row['UpdatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(release_dict,'updatedOn') else  release_dict['updatedOn']
    release_row['CreatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(release_dict,'createdOn') else release_dict['createdOn']
    release_row['Status'] = '' if not fnx.is_key_in_dictionary(release_dict,'status','narrative') else release_dict['status']['narrative']
    release_row['StartDate'] = 'NULL' if not fnx.is_key_in_dictionary(release_dict,'startDate') else release_dict['startDate']
    release_row['EndDate'] = 'NULL' if not fnx.is_key_in_dictionary(release_dict,'endDate') else release_dict['endDate']
    return release_row
コード例 #3
0
def build_sprint_row(transact_guid, sprint_dict):
    sprint_row = {}
    sprint_row['Guid'] = transact_guid
    sprint_row['Id'] = 'NULL' if not fnx.is_key_in_dictionary(
        sprint_dict, 'id') else sprint_dict['id']
    sprint_row['Title'] = '' if not fnx.is_key_in_dictionary(
        sprint_dict, 'title') else sprint_dict['title']
    sprint_row['CreatedById'] = 'NULL' if not fnx.is_key_in_dictionary(
        sprint_dict, 'owner', 'id') else sprint_dict['owner']['id']
    sprint_row['UpdatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(
        sprint_dict, 'updatedOn') else sprint_dict['updatedOn']
    sprint_row['CreatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(
        sprint_dict, 'createdOn') else sprint_dict['createdOn']
    sprint_row['Status'] = '' if not fnx.is_key_in_dictionary(
        sprint_dict, 'status',
        'narrative') else sprint_dict['status']['narrative']
    sprint_row['StartDate'] = 'NULL' if not fnx.is_key_in_dictionary(
        sprint_dict, 'startDate') else sprint_dict['startDate']
    sprint_row['EndDate'] = 'NULL' if not fnx.is_key_in_dictionary(
        sprint_dict, 'endDate') else sprint_dict['endDate']
    return sprint_row
コード例 #4
0
def build_userstory_row(transact_guid, userstory_dict):
    userstory_row = {}
    userstory_row['Guid'] = transact_guid
    userstory_row['Id'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'id') else userstory_dict['id']
    userstory_row['Title'] = '' if not fnx.is_key_in_dictionary(
        userstory_dict, 'title') else userstory_dict['title']
    userstory_row['CreatedById'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'createdBy',
        'id') else userstory_dict['createdBy']['id']
    userstory_row['UpdatedOn'] = '' if not fnx.is_key_in_dictionary(
        userstory_dict, 'updatedOn') else userstory_dict['updatedOn']
    userstory_row['UpdatedById'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'updatedBy') else userstory_dict['updatedBy']['id']
    userstory_row['CreatedOn'] = '' if not fnx.is_key_in_dictionary(
        userstory_dict, 'createdOn') else userstory_dict['createdOn']
    userstory_row['ResponsibleId'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'owner', 'id') else userstory_dict['owner']['id']
    userstory_row['Status'] = '' if not fnx.is_key_in_dictionary(
        userstory_dict, 'status',
        'narrative') else userstory_dict['status']['narrative']
    userstory_row['ReleaseId'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'release', 'id') else userstory_dict['release']['id']
    userstory_row['SprintId'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'sprint', 'id') else userstory_dict['sprint']['id']
    userstory_row['EffortEstimate'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'effortEstimate') else userstory_dict['effortEstimate']
    userstory_row['EffortRemaining'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict,
        'effortRemaining') else userstory_dict['effortRemaining']
    userstory_row['EffortLogged'] = 'NULL' if not fnx.is_key_in_dictionary(
        userstory_dict, 'effortLogged') else userstory_dict['effortLogged']
    return userstory_row
コード例 #5
0
def build_issue_row(transact_guid, issue_dict):
    issue_row = {}
    issue_row['Guid'] = transact_guid
    issue_row['Id'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'id') else issue_dict['id']
    issue_row['Title'] = '' if not fnx.is_key_in_dictionary(
        issue_dict, 'title') else issue_dict['title']
    issue_row['UserStoryId'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict,
        'UserStoryId') else issue_dict['UserStoryId']  #inserted by code
    issue_row['CreatedById'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'createdBy', 'id') else issue_dict['createdBy']['id']
    issue_row['UpdatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'updatedOn') else issue_dict['updatedOn']
    issue_row['UpdatedById'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'updatedBy', 'id') else issue_dict['updatedBy']['id']
    issue_row['CreatedOn'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'createdOn') else issue_dict['createdOn']
    issue_row['ResponsibleId'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'responsible', 'id') else issue_dict['responsible']['id']
    issue_row['Status'] = '' if not fnx.is_key_in_dictionary(
        issue_dict, 'status',
        'narrative') else issue_dict['status']['narrative']
    issue_row['Severity'] = '' if not fnx.is_key_in_dictionary(
        issue_dict, 'severity',
        'narrative') else issue_dict['severity']['narrative']
    issue_row['ReleaseId'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'release', 'id') else issue_dict['release']['id']
    issue_row['SprintId'] = 'NULL' if not fnx.is_key_in_dictionary(
        issue_dict, 'sprint', 'id') else issue_dict['sprint']['id']
    issue_row['EffortEstimate'] = '' if not fnx.is_key_in_dictionary(
        issue_dict, 'effortEstimate') else issue_dict['effortEstimate']
    issue_row['EffortRemaining'] = '' if not fnx.is_key_in_dictionary(
        issue_dict, 'effortRemaining') else issue_dict['effortRemaining']
    issue_row['EffortLogged'] = '' if not fnx.is_key_in_dictionary(
        issue_dict, 'effortLogged') else issue_dict['effortLogged']
    return issue_row
コード例 #6
0
def build_task_row(transact_guid, task_dict):
    task_row = {}
    task_row['Guid'] = transact_guid
    task_row['TaskId'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'id') else task_dict['id']
    task_row['TaskOwnerId'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'owner', 'id') else task_dict['owner']['id']
    task_row['UserStoryId'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'id') else task_dict['UserStoryId']  # inserted from code
    task_row['Title'] = '' if not fnx.is_key_in_dictionary(
        task_dict, 'title') else task_dict['title']
    task_row['CreatedById'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'createdBy', 'id') else task_dict['createdBy']['id']
    task_row[
        'UpdatedOn'] = "2099-12-31T13:56:02-07:00" if not fnx.is_key_in_dictionary(
            task_dict, 'updatedOn') else task_dict['updatedOn']
    task_row['UpdatedById'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'updatedBy', 'id') else task_dict['updatedBy']['id']
    task_row[
        'CreatedOn'] = "2099-12-31T13:56:02-07:00" if not fnx.is_key_in_dictionary(
            task_dict, 'createdOn') else task_dict['createdOn']
    task_row['Status'] = '' if not fnx.is_key_in_dictionary(
        task_dict, 'status', 'code') else task_dict['status']['code']
    task_row['EffortEstimate'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'effortEstimate') else task_dict['effortEstimate']
    task_row['EffortRemaining'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'effortRemaining') else task_dict['effortRemaining']
    task_row['EffortLogged'] = 'NULL' if not fnx.is_key_in_dictionary(
        task_dict, 'effortLogged') else task_dict['effortLogged']
    return task_row