I'm currently using the following Endpoint to create a Project in Jira Software:
/rest/project-templates/1.0/createshared/{{projectid}}
and this does create the project, but unfortunately, it assigns the incorrect project template to the specific Project. I need to assign 'Scrum Classic' to ALL projects created on Jira.
Heres what I've tried:
{
"description": "Example Project description",
"url": "{{my-url}}",
"avatarId": 10200,
"name": "Example",
"assigneeType": "PROJECT_LEAD",
"projectTypeKey": "software",
"key":"NEW1","name":"Test Project created with correct template",
"lead":"First Name",
"projectTemplateKey": "com.pyxis.greenhopper.jira:gh-scrum-template"
}
but it seems to ignore the projectTemplateKey for this Endpoint.
I have seen a solution online for creation of the project, but none for applying the project template.
by https://jira.atlassian.com/secure/ViewProfile.jspa?name=korolev_ap
Just wondering if anyone has come across this issue.
Thanks in advance.
The endpoint which you had used doesn't have the projectTemplateKey as a allowed parameter. It accepts only 3 parameters, viz., lead, key and name
You can use the officially documented Create project REST API .
Rest endpoint: POST /rest/api/2/project
It has a projectTemplateKey parameter where you can specify the project template to be used.
Sample Request payload:
{
"key": "EX",
"name": "Example",
"projectTypeKey": "business",
"projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-project-management",
"description": "Example Project description",
"lead": "Charlie",
"url": "http://atlassian.com",
"assigneeType": "PROJECT_LEAD",
"avatarId": 10200,
"issueSecurityScheme": 10001,
"permissionScheme": 10011,
"notificationScheme": 10021,
"workflowSchemeId": 10031,
"categoryId": 10120
}
Some Valid values for projectTemplateKey(try the bold ones for your case),
com.pyxis.greenhopper.jira:gh-simplified-agility-kanban
com.pyxis.greenhopper.jira:gh-simplified-agility-scrum
com.pyxis.greenhopper.jira:gh-simplified-scrum-classic
com.pyxis.greenhopper.jira:gh-scrum-template
com.pyxis.greenhopper.jira:gh-simplified-basic
com.pyxis.greenhopper.jira:gh-simplified-kanban-classic
com.pyxis.greenhopper.jira:gh-kanban-template
com.pyxis.greenhopper.jira:basic-software-development-template
@Vishal Kharde Do you know if there's a way to specify a custom projectTemplateKey, as opposed to the out-of-the-box JIRA templates? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.