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
recipes:_RecipeTemplateTopLogo
recipes:_RecipeTemplateTopLogo

Recipe overview

This recipe provides step-by-step instructions on how to use the Create On Transition for JIRA add-on to automatically create a standard Story when creating an Epic in an Agile project. This automation ensures the Story is always created, and in a consistent manner.

(info) It will take you approximately 12-13 minutes to complete this recipe.

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


Basic RecipesImage Added


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

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

Steps

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 a JIRA project to use with this recipe

Div
classtime

 Estimated Time: 2 min

In this step, you are going to create a project you will use when creating a standard Story for an Epic. To do this, log on to your JIRA instance as a JIRA Administrator and do the following:

  1. From the Projects menu, choose Create Project.
  2. In the Select Project Type screen, select Agile Scrum and click Next.
  3. The second screen shows the Issue Types that will be used (Bug, Task, Sub-task, Story and Epic). Click Select.
  4. The third screen prompts you to supply a Name and Key for your new JIRA project.
    1. Use Recipe Scrum as the Name.
    2. Use RS as the Key.
    3. Click Submit to create the project, with you set as its Project Lead.
  5. If you click Create and choose Recipe Scrum as the Project and Story as the Issue Type, you will see a Create Issue screen like the one shown to the right. Only 4 fields (Project, Issue Type, Summary and Reporter) are required, as indicated by the red asterisk next to their field labels. There are 3 optional fields: Priority, Assignee and Description.
    1. Click Cancel to close the Create Issue screen without creating an issue.

Anchor
step1
step1
Create Issue screen:

Image RemovedImage Added

Expand
titleView all screens for the Create Project wizard...

First screen:

Image RemovedImage Added

Second screen:

Image RemovedImage Added

Third screen:

Image RemovedImage Added


Expand
titleView the Configure Screen screen...

Image RemovedImage Added



Create a draft workflow

Div
classtime

Estimated Time: 1 min

In this step, you will edit the workflow used by the Recipe Scrum project so you can begin the process of adding the Create Transition post function that will create the standard Story.

  1. From the Cog menu ( Image RemovedImage Added) , choose Projects.
  2. Click the Recipe Scrum link to display the Project Summary page which shows how the project is configured.
  3. In the Workflows section of the page, click the pencil icon (Image RemovedImage Added) next to the Agile Simplified Workflow for Project RS link to edit that workflow.
  4. Click the Text button so that the workflow is shown in Text mode rather than Diagram mode.
  5. Click on the To Do link in the Step Name column to go to the Step: To Do screen.
  6. Click on the Create step to go to the Transition: Create screen.


Anchor
step2
step2
Step: To Do screen:

Image RemovedImage Added


Transition: Create screen:

Image RemovedImage Added


Add a post function on the Create transition

Div
classtime

 Estimated Time: 1 min 

In this step, you will add a post function on the Create transition. In a later step, you will configure this post function.

From the Transition: Create screen, do the following:

  1. Click the Post Functions tab to display the post functions. Your screen should look like the first screenshot shown to the right.
  2. Click the Add post function link to display the Add Post Function To Transition screen.
  3. Select Create issue and then click Add.
  4. The Add Parameters To Function screen will be displayed.



Anchor
step3
step3
Transition: Create screen, before any changes:

Image RemovedImage Added


Add Post Function To Transition screen:

Image RemovedImage Added


Configure the post function, part 1

Div
classtime

 Estimated Time: 3-4 min 

In this step, you will configure the post function you just added to the Create transition so that a standard Story will be created each type a user creates an Epic.

From the Add Parameters To Function screen, do the following:

  1. Set the parameters as shown to the right.
    1. Condition 1 indicates that the post function should only be executed when the issue being created has an Issue Type = Epic.
    2. Condition 2indicates that the post function should only be executed when the JQL Query (set in another parameter) returns no results. This is a safety precaution to prevent duplicate issues being inadvertently created. %jql_result_count% is a substitution variable
    3. Summary defines the value to be set as the Summary of the new Story being created.

      Note

      The value specified in this parameter must match the string being checked in the JQL Query parameter.


    4. Description defines the value to be set as the Description of the new Story being created.
    5. Issue Type indicates that the new issue being created will have an Issue Type of Story.
    6. Set custom field indicates that the new Story being created should have an Epic Link back to the original issue (the Epic). Note that the field name (Epic Link, in this case) is case sensitive.
    7. JQL Query is a parameter that defines a query which looks for any issue linked to the same Epic with a Summary whose value matches the Summary parameter. This query should return 0 records if the Story has not yet been created, and is used to prevent duplicate Stories from being created for the same Epic.
  2. Click Add to save your changes to the parameters and add the Create Issue post function. You will be returned to the Transition: Create screen.
  3. Your screen should now look like the screenshot shown to the right.


Anchor
step4
step4
Post Function parameters:

Condition 1
Image RemovedImage Added
Condition 2
Image RemovedImage Added
Summary
 Image RemovedImage Added
Description
 Image RemovedImage Added
Issue Type
Image RemovedImage Added
Set custom field
Image RemovedImage Added
JQL Query
Image RemovedImage Added


Transition: Create screen, after adding the Create Issue post function:

Image RemovedImage Added


Configure the post function, part 2

Div
classtime

 Estimated Time: 1 min 

In this step, you will move the new Create Issue post function so it is executed after the Epic issue is created and then you will publish the workflow so you can test it.

From the Transition: Create screen, do the following:

  1. Repeatedly click the Down Arrow icon (Image RemovedImage Added) next to the Create Issue post function until the post function is below the "Creates the issue originally" post function. This ensure the Epic is created before the Create Issue post function is executed.
  2. Your screen should now look like the screenshot shown to the right.
  3. Publish your draft workflow by clicking the Publish Draft button at the top of the screen. The Publish Draft Workflow screen will appear.
  4. When prompted whether to save a backup copy, click Yes and then click Publish.

Anchor
step5
step5
Transition: Create screen, after moving the Create Issue post function:

Image RemovedImage Added



Expand
titleView the Publish Draft Workflow screen...

Image RemovedImage Added 



Test the post function

Div
classtime

 Estimated Time: 3 min 

In this step, you will verify the post function is working as intended.

  1. Click the Create button to create a new issue. The Create Issue screen will appear.
  2. Fill in the fields as shown on the right and click Create. A popup window similar to the one shown on the right will appear to confirm the issue was created.
  3. Click the link in that popup to open the Epic you just created.
  4. You should see a screen similar to the first screenshot shown on the right, with the "Issues in Epic" section showing the standard Story that was automatically created.
  5. Click the link to the new Story and you should see a screen similar to the last screenshot shown on the right. This new Story shows an Epic Link to the Epic that was manually created.

That's it! By adding a post function to create this standard Story automatically, you can be assured that every Epic will have such a story and your team will spend less time creating issues!


Tip
titleBest Practice

If your post function is malfunctioning in any way, enable additional DEBUG logging as described here so that the Create On Transition add-on writes additional information to the JIRA log file. This information will help you understand the cause of the problem and how to resolve it.

You may also want to read our tips on the Create On Transition add-on.


Anchor
step6
step6
Create Issue fields:

ProjectRecipe Scrum (RS)
Issue TypeEpic
Epic NameTest Epic
SummaryTest Epic Summary


Confirmation popup window:

Image RemovedImage Added

Epic that was created manually:

Image RemovedImage Added

Story that was created automatically:

Image RemovedImage Added


Include Page
recipes:_RecipeTemplateFooter
recipes:_RecipeTemplateFooter