I’m trying to create a project programmatically.
I found this:
But validation will fail, unless I supply everything:
ProjectCreationData data = new ProjectCreationData.Builder() .withAssigneeType(Assignee Type as Long) .withAvatarId(Avatar ID as Long) .withDescription("Project Desc") .withKey("Project Key") .withLead("Username of lead") .withName("Project Name") .withType("Project Type Key") .withUrl("Project URL") .withProjectTemplateKey("Project Template Key") .build();
The problem I have is with the project template. Validation will fail unless I provide an template, but if I provide the default template:
It will create default issue/workflow/screen schemes along with the project, and I don’t want that.
To create my own template, I found addProjectHook() in:
Which in turn requires a ConfigureData class:
The static create() method seems to be what I want, but it requires a Project… before I create the project.
How to programmatically create a project along with the associated issue/workflow/screen schemes, or how to create a project with no schemes attached, then configure the schemes afterwards?