Skip to content

Creating a Jira Automation to automatically update "Story points" when "Story points median" or "Confidence" changes

Justin Meyer edited this page Aug 1, 2024 · 9 revisions

Once teams have established plans, they still want to be able to adjust their epic's "Story points" by changing "Story points median" and "confidence" without having to rerun the autoscheduler.

This is possible with a Jira Automation. This will guide you through creating the automation.

There are three steps to get it working:

  • Identifying your custom field ids
  • Import the automation rule
  • Adjust the rule to match your fields

At the end of this page you will find:

  • Customizing
  • Troubleshooting

Step 1: Identifying your custom field ids

Jira automations reference custom fields by their IDs, not their name. So if you created custom fields for "Story points median" and "Story points confidence", you will need to find their field id.

The best way to do this is to:

  1. Go to Issues configuration
  2. Click Custom fields
  3. Search for your custom fields.

Custom_fields_-_Jira

Once you find your custom field, open the ... menu and click Edit details:

Custom_fields_-_Jira

The URL will have the id. For example, this instance's "Story points median" field id is 10070:

Edit_Custom_Field_-Details-Jira_and_Editing_Creating_a_Jira_Automation_to_automatically_update__Story_points__when__Story_points_median__or__Confidence__changes·_bitovi_jira-auto-scheduler_Wiki

Repeat this process for both the median and confidence custom fields.

Step 2: Import the automation rule

The easiest way to create the automation is to download the following automation and upload it to Jira.

First, click the following link to download the Adjust Story Points automation rule:

automation-rule-20860138-202408010246.json

Next, in your System settings, find the Global Automation page:

Rules_-Automation-_Jira

Click the Import rules button within the ... menu:

Rules_-Automation-_Jira

Drag and drop or click the button to upload the automation:

image

Check the Adjust Story Points rule. Optionally limit it to specific projects.

Rules_-Automation-_Jira

Step 3: Adjust the rule to match your fields

The rule needs to be edited to work in your Jira instance. Specifically, it needs to be updated with your custom field ids.

To edit the rule, click the Adjust Story Points"= link:

Rules_-Automation-_Jira

Find the custom field identifiers by clicking the Then: Send web request action and locating the Custom data textbox:

Rule_builder_-Automation-_Jira

Replace the existing custom field numbers (customfield_10070 and customfield_10069) with your custom field numbers. The JSON / mustache code looks like:

{
  "storyPointsMedian": {{issue.fields.customfield_10070}},
  "storyPointsConfidence": {{issue.fields.customfield_10069}},
  "riskThreshold": 80
}

Finally, click Update and toggle on the automation.

Rule_builder_-Automation-_Jira

Customizing

Checkout the endpoint documentation for additional customization possibilities.

Troubleshooting

You can test the request on its own within Jira by:

  1. Clicking on the Send web request action
  2. Clicking the Validate your web request configuration details control
  3. Entering the key of an issue that has the median and confidence fields specified.
  4. Clicking Validate and exploring the response.

Rule_builder_-Automation-_Jira