Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create a project template in JIRA and use this project template key in REST API call for creating project

Abhinay February 13, 2017

Hi,

I have created a project template in JIRA using this tutorial (https://developer.atlassian.com/jiradev/jira-platform/guides/projects/tutorial-creating-a-project-template). Now i want to use this project template key as an argument in REST API call for create project .

Does JIRA allows this and what is the actual key of this project template ?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2017

Hi Abhinay,

Starting from JIRA 7.0.0 there is "create" REST API method: https://docs.atlassian.com/jira/REST/server/#api/2/project-createProject and there is projectTemplateKey param.

Abhinay February 13, 2017

Hi Volodymyr,

Thanks for the response.

I tried using projectTemplateKey param, but it says "The project template specified does not exist. Make sure the project template is available in your JIRA instance. Please talk to your JIRA administrator if you need more help."

Here is my POST request 

{
"key": "EX",
"name": "Example",
"projectTypeKey": "business",
"projectTemplateKey": "http://gaya.spd.analog.com:8080:my-project-template",
"description": "Example Project description",
"lead": "Charlie",
"url": "http://gaya.spd.analog.com:8080",
"assigneeType": "PROJECT_LEAD",
"avatarId": 10200,
"issueSecurityScheme": 10001,
"permissionScheme": 10011,
"notificationScheme": 10021,
"categoryId": 10120
}

i want to know what actually is the key of the project template created using this tutorial  (https://developer.atlassian.com/jiradev/jira-platform/guides/projects/tutorial-creating-a-project-template)

project template is added as an add-on in our JIRA instance.

 

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2017

The key is: "your addon key" + ":" + "plugin module key". Please check the REST help I linked in the previous comment.

For the tutorial, plugin module key is "my-project-template" and you need to check how the addon key is set in atlassian-plugin.xml, atlassian-plugin section. Usually it's combination of groupId and artifactId from the pom.xml, but you need to check it.

Abhinay February 14, 2017

Thanks a lot Volodymyr smile

Now am able to use the project template for creating projects.

Abhinay February 19, 2017

Hi Volodymyr,

A little more help required,actually am a newbie to JIRA

I have created a project template, but am unable to change the Template name and description which is displayed in create project dialog box.I tried changing the ".properties" file but changes are not getting reflected in create project dialog box.

please suggest me how to do this...attached is the screenshot for reference

image2017-2-20 10:25:12.png 

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2017

Hi Abhinay,

Changing the appropriate properties should certainly change the UI.

Only explanation is that old properties file is used. In you addon folder:

  • stop the addon
  • run atlas-mvn clean
  • launch it again atlas-run
Abhinay February 20, 2017

Thanks Volodymyr, this works.

TAGS
AUG Leaders

Atlassian Community Events