How to create a self service create project page - Advanced example

Summary

For Jira, you may want to allow a certain set of users the ability to create a new project in a standard way without granting them Jira admin authority. This shows how to set up a self service CLI page for this. You can restrict the page to the appropriate subset of users that need this capability. This works by running the actions under a specific Jira administrator profile, but by controlling what can be done. 

This example is similar to How to create a self service create project page, but illustrates that multiple actions can be taken with the CLI macro so that a more complicated new project template can be used. This makes it possible for administrators to clearly document and run templates to ensure consistency. 

Steps

  1. Configure Run CLI Actions in Confluence with appropriate profile for Jira that has administration permissions.
  2. Install Run Self-Service Reports for Confluence.
  3. Install Macro Security for Confluence and secure the ability to use the cli macro to only jira-administrators or equivalent.
  4. Create a page similar to the example below to a suitable location. Use Insert > Markup or do equivalent via Macro Browser.
    • Add more replace parameters if you need to give users more control over scheme setting, etc...
    • Add more parameters to the createProject action to enforce any standards you have for projects.
  5. Restrict edit permission on the page to jira-administrators or equivalent (must be permitted by your macro security configuration).
  6. Restrict view access to the page to only users that you want the ability to create projects.

Example

This example requires a project name and key. It defaults the project lead to the current logged-in user. This uses wiki markup (Use Insert > Markup) or you can do the equivalent via Macro Browser.

Example page
h3. Description
Use this page to create a standard JIRA project

{run:id=cli|titleRun=Create JIRA project|replace=name::Project name:text-required,key::Project key:text-required,lead:$current_user_id:Lead:text-required}

{cli:profile=jira}
--action run --common "--project Samplesoft"
 
@DATA:
 
--action createProject --lead automation
 
--action createIssue --type improvement --summary "Phase 1"  
--action createIssue --parent @issue@ --type sub-task --summary "Task 1" 
--action createIssue --parent @issue@ --type sub-task --summary "Task 2" 

--action createIssue --type improvement --summary "Phase 2"   
--action createIssue --parent @issue@ --type sub-task --summary "Task 1"  
--action createIssue --parent @issue@ --type sub-task --summary "Task 2" 
{cli}

{run}

Macro Browser View

Screen shot