Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Duplicate a project by rest api, Does not update project lead

I try to create a project based on another of my projects (<<myprojectid>>). Code below works, but it doesn´t update the Project Lead (leadAccountId). Any thought?
function createProject(){


var IssueURL = "<<myprojectid>>";
var apikey = "xxxxxxxxxxxx";
var login = "";
var UserCredentials = "Basic " + Utilities.base64Encode(login + ":" + apikey);

var Data = {"key":"NEWPRJ11","name":"Test Project created with shared configuration with T<<myprojectid>>", "leadAccountId":"NNNxNNNNNNxNNNNNNxxNxNNx"} ;


var payload = JSON.stringify(Data);


var headers = {"Accept":"application/json",


var options = {"method":"POST",
"payload" : payload,


var response = UrlFetchApp.fetch(IssueURLoptions);


var dataAll = JSON.parse(response.getContentText());
var issueKey = dataAll.key;
Logger.log (issueKey);

0 answers

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you