TSP-4673 moved BambooClient.registerPlanBranch code into a function
TSP-4673 Fixed the bambooClient variable scope and replaced it with self