Creating a project via REST based on JIRA Default Schemes

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Before JIRA 6.2, newly created projects use the Default Issue Type Scheme. After JIRA 6.2 all new projects are created with a new Issue Type Scheme, Workflow and Screen Scheme. This requires a lot of task as the users have to change the assigned schemes and then delete the new ones. In order to avoid creating new issue type schemes, "JIRA Classic" or "Project Management" project type must be selected so that the Default Issue Type would then be used. 

The following appears in the XXXXXXXXXXX.log

Workaround

For users who use REST API to create a project, here's a guide to create a project that will use JIRA Default Schemes:

  • $JIRAURL/rest/project-templates/1.0/templates as the Request URL
  • include the arguments below:
    • projectTemplateWebItemKey : com.atlassian.jira-legacy-project-templates:jira-blank-item
    • projectTemplateModuleKey : com.atlassian.jira-legacy-project-templates:jira-blank-item
    • name : project_name
    • key : PROJECTKEY
    • lead : project_lead
    • keyEdited: false

 

An example of working cURL command on JIRA 6.4.14:

curl -D- -u admin:sphere -X POST -H "X-Atlassian-Token: nocheck" -H "Content-Type: application/x-www-form-urlencoded" "http://localhost:61021/jira6414/rest/project-templates/1.0/templates?projectTemplateWebItemKey=com.atlassian.jira-legacy-project-templates%3Ajira-blank-item&projectTemplateModuleKey=com.atlassian.jira-legacy-project-templates%3Ajira-blank-item&name=SECOND+Create+from+REST+API&key=CFRAPI&lead=admin&keyEdited=false"

Resolution

This is still a feature request being tracked under : JRA-27256 - Getting issue details... STATUS

Last modified on Dec 20, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.