Пример #1
0
def csv2youtrack(source_file, target_url, target_login, target_password, comments_file=None, attachments_file=None):
    target = Connection(target_url, target_login, target_password)
    source = Client(source_file)
    source_comments = None
    if comments_file:
        source_comments = Client(comments_file)

    source_attachments = None
    if attachments_file:
        source_attachments = Client(attachments_file)

    config = CsvYouTrackImportConfig(csvClient.FIELD_NAMES, csvClient.FIELD_TYPES)
    importer = CsvYouTrackImporter(source, target, config, source_comments, source_attachments)
    importer.import_csv()
def csv2youtrack(source_file, target_url, target_login, target_password):
    target = Connection(target_url, target_login, target_password)
    source = Client(source_file)

    config = CsvYouTrackImportConfig(csvClient.FIELD_NAMES,
                                     csvClient.FIELD_TYPES)
    importer = CsvYouTrackImporter(source, target, config)
    importer.import_csv()
def csv2youtrack(source_file, target_url, target_login, target_password):
    target = Connection(target_url, target_login, target_password)
    source = Client(source_file)

    import_custom_fields(source.get_header(), target)

    max = 100
    while True:
        issues = source.get_issue_list(max)
        if not len(issues):
            break
        projects = get_projects(issues)
        for p in projects:
            try:
                target.getProject(p)
            except YouTrackException:
                target.createProjectDetailed(p, p, "", target_login)

            target.importIssues(p, p + " Assignees", [to_yt_issue(issue, target)
                                                      for issue in issues if (get_project(issue) == p)])