Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Div
idProductTOC

On this page

Table of Contents
maxLevel1
excludeOn this page
typeflat
separator |

Include Page
_RecipeTemplateTopLogo
_RecipeTemplateTopLogo

Recipe overview

This recipe provides step-by-step instructions on how to create a JIRA project and associate existing schemes to it using the JIRA Command Line Utility (CLI) add-on. This allows a JIRA Administrator to quickly, consistently and flawlessly create new projects when requested by your users, especially after you have created your project templates to standardize your organization's use for JIRA.

You will need JIRA Administrator permissions to your JIRA instance in order to complete this recipe.

(info) It will take you approximately 5 minutes to complete this recipe.

(warning) Note that this recipe is currently optimized for JIRA 6.4. Stay tuned for another version optimized for JIRA 7.

Recipe level

Table plus
border0
heading0
multiplefalse
enableHeadingAttributesfalse
columnAttributesstyle="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;"
enableSortingfalse
classingredients_table
enableHighlightingfalse



Ingredients

Table plus
border0
heading0
multiplefalse
enableHeadingAttributesfalse
columnAttributesstyle="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;"
enableSortingfalse
classingredients_table
enableHighlightingfalse



Preparation

  • Install the latest downloadable JIRA CLI Client on your computer.
  • If you have not done so already, follow all of the CLI installation instructions for JIRA including the steps marked optional.
  • Open a command window you you'll use to execute CLI commands. 

...

Table plus
border0
heading0
multiplefalse
enableHeadingAttributesfalse
columnAttributesstyle="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;"
idsteps_table
enableSortingfalse
enableHighlightingfalse


Create Example Schemes

Div
classtime

Image Modified Estimated Time: 2 min

In this step, you will be creating a JIRA project using the Create Project wizard. This ensures you have a full set of schemes that can be used later on when creating a new project via the JIRA CLI.  In real life, you'd create (or identify a pre-existing) project and schemes on which you want to base future projects.

In your JIRA instance, do the following:

  1. From the Projects menu, choose Create Project to begin the Create Project wizard.
    1. On the first screen, choose Simple Issue Tracking and click Next.
    2. The second screen shows you the Issue Types the project will use. Click Select.
    3. On the final screen, specify the values shown on the right and then click Submit. The Create Project window is closed and the new project is created.
  2. Click the Cog icon Image Modified and choose Projects to go into the Project List administration screen.
  3. Click the Recipe Testing link in the Name column to view your new project's Summary screen. It should look like the screenshot shown to the right. Each scheme associated with this project is highlighted with an arrow and is also listed below.

    Div
    stylemax-width: 600px;


    Type of SchemeScheme Name
    Field Configuration Scheme<default>
    Issue Type SchemeRECIPE: Simple Issue Tracking Issue Type Scheme
    Issue Type Screen SchemeRECIPE: Simple Issue Tracking Issue Type Screen Scheme
    Notification Scheme<default>
    Permission Scheme<default>
    Workflow SchemeRECIPE: Simple Issue Tracking Workflow Scheme



Anchor
step1
step1
Project values, input on final screen of the Create Project wizard:

NameRecipe Testing
KeyRECIPE
Project Lead<accept the suggested value>


Expand
titleView each screen of the Create Project wizard...

Image Modified 

Image Modified

Image Modified

 


Project Summary page:

Image Modified


Create JIRA CLI command

Div
classtime

Image Modified Estimated Time: 2 min

In this step, you will form the command line that will invoke the JIRA CLI to create the project.

The command is shown to the right.

  1. jira indicates to invoke the JIRA CLI client.
  2. The createProject action indicates you want to create a new JIRA project. This action uses the following parameters:
    1. --project identifies the project key you want to use for the new project. This should be a 2-10 character string that conforms to any naming standards you may have established.
    2. --name indicates the name of the new project.
    3. --lead indicates the userid of the user who will be the project lead of the new project.

      Note

      You should replace "joe" with a userid that is defined in your JIRA instance and that has group and/or project role memberships that will allow him to set as project lead. (Typically this is membership in the jira-developers group.)


    4. --defaultAssignee indicates who will be the default Assignee on newly created issues for the new project. Allowable values are "PROJECT_LEAD", "PROJECT_DEFAULT", "COMPONENT_LEAD" or "UNASSIGNED." You can supply a value of "UNASSIGNED" or omit this parameter entirely to indicate that the default Assignee should be "Unassigned."
    5. --issueTypeScheme indicates the name or id of the Issue Type Scheme to associate to the new project. In this recipe, you'll set it to use the one used by the RECIPE project you created in Step 1.
    6. --issueTypeScreenScheme indicates the name or id of the Issue Type Screen Scheme to associate to the new project. In this recipe, you'll set it to use the one used by the RECIPE project you created in Step 1.
    7. --workflowScheme indicates the name or id of the Workflow Scheme to associate to the new project. In this recipe, you'll set it to use the one used by the RECIPE project you created in Step 1.
 


Info
titleUsing Default Schemes

You may have noticed that the example command line does not contain the --fieldConfiguration, --notificationScheme or --permissionScheme parameters. When any of these are omitted, JIRA CLI associates the new project to the corresponding default scheme.


Info
titleUsing the Lookup Parameter

If you add the --lookup parameter to the example command shown, then --lead can be specified as a partial userid and the system will do a search for that user.

As long as the search finds a single user matching that partial string, that user can be set as the project lead. Otherwise, an error will occur.


Anchor
step2
step2
Example command:

Code Block
languagetext
themeDJango
linenumberstrue
jira --action createProject --project "projectkey" --name "projectname" --lead "joe" --defaultAssignee "UNASSIGNED" --issueTypeScheme "RECIPE: Simple Issue Tracking Issue Type Scheme" --issueTypeScreenScheme "RECIPE: Simple Issue Tracking Issue Type Screen Scheme" --workflowScheme "RECIPE: Simple Issue Tracking Workflow Scheme"

 

 

 






Execute JIRA CLI command

Div
classtime

Image Modified Estimated Time: 1 min 

In your command window, type the command from the previous step and press Enter.

The command will run, showing the result of executing the createProject action.

To inspect the newly created project, click the Cog icon Image Modified and choose Projects to go into the Project List administration screen. Then click the projectname link in the Name column to view your new project's Summary screen. It should look similar to the screenshot shown to the right.

That's it! With one command, you've created a JIRA project and saved yourself from having to complete many steps to do it!

Anchor
step3
step3
Example output:

Code Block
languagetext
themeDJango
linenumberstrue
Project 'projectname' created with key PROJECTKEY and id 10101.
 


Project Summary page:

Image Modified


Include Page
_RecipeTemplateFooter
_RecipeTemplateFooter