If you answered yes to any of the above questions, read on! This blog will outline how to concisely measure issue weight for prioritization and reporting purposes. Before we get started though, here's a quick rundown of terms for those of you new to Jira and/or Automation that you'll see come up from time to time in this post:
Automation is a no-code rule builder that enables customers to build if-this-then-that-rules based on events in Jira. It allows teams to automate their processes, save time, keep Jira up to date and focus on what’s most important. Occasionally we refer to the act of automating processes in Jira as Automation, as opposed to referring to the module itself.
Jira application issues are made up of fields. You can choose any number of fields to appear when creating, editing, or transitioning issues. You can also create custom fields for teams working on issues within any of your Jira projects. Custom fields allow people to add information specific to your team's needs.
Smart values allow you to access issue data within Jira. For example, you can use the following smart values in Jira Automation to send an email message that includes the issue key and issue summary:
Take a look below!
It's that simple! We're gonna use the combination of custom fields and smart value formulas through automation to achieve our goal. And the best part? We're gonna do it all out-of-box in Jira Cloud- no addons required! Now...let's get started!
First, we will need to set up a new custom field for each criteria you'd like your issues weighted on.
Field Name: [Criterion Name]
Field Type: Select List (single choice)
Options/Values: Up to you!
Below is an example of what your criterion custom field(s) might look like. I've created a new weighted criterion called New Sales Growth:
IMPORTANT: You will want to write down the customfieldID of any and all newly created custom fields from this step onward, as they will be necessary for future steps.
Please note, that the "Administer Jira" Global permission is necessary to complete these steps.
Navigate to Settings > Issues > Custom fields under the Fields section
Click on the More (⋯) icon to the right of the custom field you are obtaining the ID
Select the Contexts and default value option
Observe the URL in your browser, which will contain the ID of the field
Lastly, create one more custom field, a Single Line Text Field, and call it Issue Weight. This will be the field that holds our final weighted value for each issue! We're now ready to start building our automation!
This section will break down each step of the process and help you understand how weight values are retrieved and calculated. We will start with a new automation simply called Issue Weight Priority Automation.
This automation will fire whenever the fields found under the Fields to monitor for changes are modified in any way. This includes upon issue creation and when editing an issue when you set your Change type to Any changes to the field value. When we configure our criteria fields with a default value, this ensures that our automation will always fire with this trigger.
You can configure a conditional step that will allow this automation to fire only on issues that meet the specified conditions. You can restrict this to a project, an issue type, or even issues with specific field values populated in them. My automation is set to run only on issues in the project ES23.
This is where we start calculating. The lookup table allows for assigning values to keys that can be referenced later in the automation via the use of smart values. In my example, my Lookup table variable name is scores, so referencing a value from this table looks like this:
You can create your own key abbreviations and assign a value to each of them! In my example, I have six criterion custom fields that will contain values, so I created six entries for key/value assignments.
Let's use a specific smart value to pull a value from my table as an example! If I decide I want to reference the value for key NSG later in my automation, I would enter . Jira will then retrieve a value of 0.20, or 20%, for me to use. This is because the value adjacent to key NSG is .20 in my table. These values do not have to be in decimal format in other automations, but for our purposes here, they do.
Using custom fields' values and smart value formulas, we are able to grab the user-defined value for each weight criterion and multiply it by the value defined in the lookup table we just made! In my automation, six weight criteria were defined and six variables were created, each with their own version of the formula shown below.
We're almost at the end! We're going to utilize all of the variables we've created up to this point, so once all weight criteria variables are defined, we will create one more smart value formula to sum all of the previous variables together and get our final issue weight. Go ahead and name the Variable name something like issueWeight. Here's how you'll want to format your Smart value, where the category is what you previously named your category smart variables from the last step:
The final step of this automation is responsible for retrieving the smart variable from the previous step and putting this value into the Issue Weight field on the issue in question. It is recommended to exclude your Issue Weight-equivalent field from any Edit screens so that the field remains read-only; this will ensure that only this automation is able to make changes to this field.
Absolutely! You will want to re-configure the following steps of your automation in order to add/remove weighted criterion:
The audit log is a great tool when determining the cause of certain issues/errors that are encountered as the automation runs. Problems such as missing field contexts and null field values can lead to this automation erroring, so you will want to consult the audit log via the broken issue or the automation itself to get to the root of the problem.
Check out the sources I referenced below! You can learn a whole lot more about automation, custom fields, and smart values by checking out those articles.