Snippets

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

Updated by Kristian Walker

File CreateAJiraProjectFromTheScriptConsole.groovy Added

  • Ignore whitespace
  • Hide word diff
+/*
+* 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/2/project")
+    .header('Content-Type', 'application/json')
+    .body([
+        "key": "<ProjectKeyHere>", // Specify here the project key 
+        "name": "<ProjectNameHere>", // Specify here the project name 
+        "projectTypeKey": "<ProjectTypeKeyHere>", // Specify here the project type
+        "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management", // Specify here the project template key
+        "description": "<ProjectDescriptionHere>", // Specify here the project description
+        "lead": "<ProjectLeadHere>", // Specify here the project lead user
+        "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.
+    ])
+    .asString()

File snippet.groovy Deleted

  • Ignore whitespace
  • Hide word diff
-/*
-* 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/2/project")
-    .header('Content-Type', 'application/json')
-    .body([
-        "key": "<ProjectKeyHere>", // Specify here the project key 
-        "name": "<ProjectNameHere>", // Specify here the project name 
-        "projectTypeKey": "<ProjectTypeKeyHere>", // Specify here the project type
-        "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management", // Specify here the project template key
-        "description": "<ProjectDescriptionHere>", // Specify here the project description
-        "lead": "<ProjectLeadHere>", // Specify here the project lead user
-        "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.
-    ])
-    .asString()
Created by Kristian Walker

File snippet.groovy Added

  • Ignore whitespace
  • Hide word diff
+/*
+* 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/2/project")
+    .header('Content-Type', 'application/json')
+    .body([
+        "key": "<ProjectKeyHere>", // Specify here the project key 
+        "name": "<ProjectNameHere>", // Specify here the project name 
+        "projectTypeKey": "<ProjectTypeKeyHere>", // Specify here the project type
+        "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management", // Specify here the project template key
+        "description": "<ProjectDescriptionHere>", // Specify here the project description
+        "lead": "<ProjectLeadHere>", // Specify here the project lead user
+        "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.
+    ])
+    .asString()
  1. 1
  2. 2
HTTPS SSH

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