diff --git a/src/main/resources/tfsdk/CreateWorkItem.py b/src/main/resources/tfsdk/CreateWorkItem.py index 8e8c761..30972a3 100644 --- a/src/main/resources/tfsdk/CreateWorkItem.py +++ b/src/main/resources/tfsdk/CreateWorkItem.py @@ -22,10 +22,6 @@ print "No server provided." sys.exit(1) -# original -# TFS_SERVER_URL = 'http://54.186.219.167:8080/tfs' -# COLLECTION_URL = 'http://54.186.219.167:8080/tfs/DemoCollection-2' - if username is None: username = tfsServer['username'] if password is None: @@ -39,17 +35,15 @@ # set up tfs tpc = TFSTeamProjectCollection(URIUtils.newURI(tfsAPIUrl), credentials) -print "\r\rprojectName name: %s \r" % (projectName) # "DemoTeamProject-2" -#NO: project = tpc.getWorkItemClient().getProjects().get("%s" % projectName) -#NO: project = tpc.getWorkItemClient().getProjects().get(projectName) -project = tpc.getWorkItemClient().getProjects().get("DemoTeamProject-2") +print "\r\rprojectName name: %s \r" % (projectName) +project = tpc.getWorkItemClient().getProjects().get(projectName) print "\r\r created project object" # Find the work item type matching the specified name. -bugWorkItemType = project.getWorkItemTypes().get(workItemType) # get("Bug") +bugWorkItemType = project.getWorkItemTypes().get(workItemType) # e.g., get("Bug") # Create a new work item of the specified type. -newWorkItem = project.getWorkItemClient().newWorkItem(bugWorkItemType) # Bug +newWorkItem = project.getWorkItemClient().newWorkItem(bugWorkItemType) # e.g., Bug # Set the title on the work item. newWorkItem.setTitle(workItemTitle)