def test_01_createBundle(self):
     enum_bundle = EnumBundle()
     enum_bundle.name = "TestEnumBundle"
     enum_bundle.values = []
     value_names = ["first", "second", "third"]
     for vn in value_names :
         element = EnumField()
         element.name = vn
         element.description = vn + " description"
         enum_bundle.values.append(element)
     response = self.con.createBundle(enum_bundle)
     self.assertTrue(response.find("http://unit-258.labs.intellij.net:8080/charisma/rest/admin/customfield/bundle/" + enum_bundle.name) != -1)
Пример #2
0
 def test_01_createBundle(self):
     enum_bundle = EnumBundle()
     enum_bundle.name = "TestEnumBundle"
     enum_bundle.values = []
     value_names = ["first", "second", "third"]
     for vn in value_names :
         element = EnumField()
         element.name = vn
         element.description = vn + " description"
         enum_bundle.values.append(element)
     response = self.con.createBundle(enum_bundle)
     self.assertTrue(response.find("http://unit-258.labs.intellij.net:8080/charisma/rest/admin/customfield/bundle/" + enum_bundle.name) != -1)

#        for parent_id, tasks in tasks_to_import:
#            import_result = target.importIssues(project_id, project_id + " assignees", tasks)
#


def doImport(project_names_to_import, source, target):
    last_page = False
    current_page = 1
    log_step("Creating custom fields")
    try:
        target.createCustomFieldDetailed("State", "state[1]", False, True, True, {"attachBundlePolicy": "2"})
    except YouTrackException, e:
        pass
    colors_bundle = EnumBundle()
    colors_bundle.name = "Colors"
    try:
        target.createBundle(colors_bundle)
    except YouTrackException, e:
        log_message(e)
    try:
        target.createCustomFieldDetailed(
            "Color", "enum[1]", False, True, True, {"defaultBundle": colors_bundle.name, "attachBundlePolicy": "0"}
        )
    except YouTrackException, e:
        pass
    try:
        status_bundle = StateBundle()
        status_bundle.name = "Statuses"
        target.createBundle(status_bundle)
Пример #4
0
#            import_result = target.importIssues(project_id, project_id + " assignees", tasks)
#


def agilezen2youtrack(source_url, source_token, target_url, target_login,
                      target_password, project_names_to_import):
    source = Client(source_url, source_token)
    target = Connection(target_url, target_login, target_password)
    last_page = False
    current_page = 1
    try:
        target.createCustomFieldDetailed("State", "state[1]", False, True,
                                         True, {"attachBundlePolicy": "2"})
    except YouTrackException, e:
        print str(e)
    colors_bundle = EnumBundle()
    colors_bundle.name = "Colors"
    try:
        target.createBundle(colors_bundle)
    except YouTrackException, e:
        print str(e)
    try:
        target.createCustomFieldDetailed(
            "Color", "enum[1]", False, True, True, {
                "defaultBundle": colors_bundle.name,
                "attachBundlePolicy": "0"
            })
    except YouTrackException, e:
        print str(e)
    try:
        status_bundle = StateBundle()