Adaptavist Create A Jira Project From The Script Console. Jira Cloud

Created by Kristian Walker last modified
* This example script  console script shows how you can create a new Jira Project from a script.
* "All right, title and interest in this code snippet shall remain the exclusive intellectual property of Adaptavist Group Ltd and its affiliates. Customers with a valid ScriptRunner
* license shall be granted a  non-exclusive, non-transferable, freely revocable right to use this code snippet only within their own instance of Atlassian products. This licensing notice cannot be removed or
* amended and must be included in any circumstances where the code snippet is shared by You or a third party." 

def result = post("/rest/api/3/project")
    .header('Content-Type', 'application/json')
        "key": "<ProjectKeyHere>", // Specify here the project key 
        "name": "<ProjectNameHere>", // Specify here the project name 
        "projectTypeKey": "<ProjectTypeKeyHere>", // Specify here the project type. using either: software, service_desk, business
        // A list of all the project templace keys can be found in the page at:
        "projectTemplateKey": "<ProjectTemplateKeyhere>", // Specify here the project template key. An example of a valid key is: com.pyxis.greenhopper.jira:gh-simplified-agility-scrum
        "description": "<ProjectDescriptionHere>", // Specify here the project description
        "leadAccountId": "<ProjectLeadHere>", // Specify here the project lead user. You must specify a users account ID here
        "url": "<ProjctURLHere>", // Specify here the project url
        "assigneeType": "PROJECT_LEAD", // Specify here the default assignee value
        "avatarId": 10200, // Specify here the ID of the project avatar to use
        //"issueSecurityScheme": 10001, // Uncomment and specify here the ID of the issue security scheme to use if you require one
        "permissionScheme": 10001, // Specify here the ID of the permission scheme to use
        "notificationScheme": 10000, // Specify here the ID of the notification scheme to use
        // "categoryId": 10120  // Uncomment and specify the ID for the proiect category if required.

Comments (0)


You can clone a snippet to your computer for local editing. Learn more.