In a previous post we explored the default behavior of the Organizations field in Jira Service Management. We uncovered how agents inadvertently share requests with entire organizations when manually adding them to the field, and we discussed the implications of this behavior for the accuracy of Jira reporting by organization.
Creating reports to track request volumes per organization in Jira is a common need. These reports can be generated using native Jira gadgets or third-party charting and reporting tools. However, the behavior of the Organizations field might lead to a significant number of actual requests being omitted from reports, which can result in inaccuracies and misrepresentation of data. Moreover, if your agents manually fill in organizations to the field in requests to improve Jira reports, all those requests become shared and visible to the entire organizations they’re added to.
To address this reporting gap, a practical solution emerges: the creation of a custom field tailored for accurate organizational reporting. Here’s how it works:
*Please note that in company-managed projects, you must be a Jira Administrator. In team-managed projects, Project Admins can set up custom fields.
Utilizing your newly created field, you can employ a Jira Automation rule to capture customer data regarding their organization affiliation and assign it to the custom label field Organization name. This will enable you to accurately report on Organizations, even if the default Organizations field is empty.
Create a new rule with the trigger “Issue created”. If you need to restrict the types of requests accounted for or add any other conditions, you can do so by adding a “If : Add a condition” block with your filters and conditions.
We propose two paths for the solution:
This method involves simple Jira automation checks to determine if the customer belongs to a known Organization from your list. While straightforward, it requires knowing all your organizations and creating rules for each, which is feasible for businesses with known number of organizations.
This simple method functions for the cases where all organizations are included in the rule. For instance, if there are 5 organizations in your list, but the rule is configured to check only 3 of them, then you can anticipate that the custom field you created will be empty for the remaining 2 organizations.
Trigger | Conditions blocks | Action |
Issue Created | If matches -> Reporter is in a “Given_Organization” | Edit issue fields-> “Your_custom_field” and manually type the name of the Organization |
Else-if -> make a check for the next Organization/s until you have covered all of them | Same as above |
If the reporter is affiliated with multiple organizations, more complex rules may be required to address this situation effectively.
Utilize REST API calls to automatically populate the custom field Organization name with relevant organizational data upon issue creation. This scalable approach minimizes manual intervention and enhances efficiency.
5. Create a Smart value check with the first value as “{{webResponse.body.values}}” and condition “Does not equal”. Leave the second value empty.
6. Add the action ‘Edit Issue’: Do not select any fields. Instead, set the custom field using the “Additional fields” option with the provided template.
This code is designed to update the label field with data retrieved from the Organizations through the Customer API call. If using the custom field name doesn’t work, resort to using the custom field’s ID. To find it, go to the settings for your custom field at Settings -> Custom Fields -> Search, and open the desired custom field. Alternatively, click the three dots on the right and select “Edit details”. Assemble the word “customfield_” with the ID from the URL.
{
"update": {
"Organization name":
[
{{#webResponse.body.values}}
{"add": {{name.asJsonString.replace(" ","-")}}}
{{^last}},{{/}}{{/}}
]
}
}
This automation rule will operate only if the customer has been added to an existing Organization in your Project Settings. The Organization name field for issues reported from new customers without any associated Organization in Jira will remain empty.
Automatic extraction of domains from customers’ emails is a solution that you can use for this scenario. Create a new name for the label by extracting the name from the customer’s domain, like this:
{{issue.reporter.emailAddress.substringafter("@")}}
Let’s examine how organization-based reports, generated with the Performance Objectives app for Jira, will look in three distinct scenarios:
In this report, we have chosen the default Jira field Organizations for Display by. You’ll notice there are 5 “Empty” issues. These represent customer requests with empty Organizations fields, making them unattributable to any existing Organizations in your project.
In this report, we’ve chosen the newly created custom field Organization name for Display by. It guarantees the inclusion of all already existing customer requests in the report, even if their default Organizations field is left empty due to various reasons. However, requests from new customers not added to any organization will still appear as “Empty” in the chart.
In this report, we’ve also opted for the custom field Organization name for Display by. However, we have automatically extracted the domains of new customers to derive insights from their data, rather than leaving them as “Empty” entries in the chart.
The implementation of Jira automation and custom field creation for gathering organization data significantly enhances the accuracy of insights derived from Jira reporting. By providing stakeholders with reliable data, this approach empowers informed decision-making. Furthermore, it effectively eliminates the need for agents to manually add organizations to the default field of requests, thereby preventing inadvertent sharing of sensitive information.
Check out the Performance Objectives app for Jira to explore its powerful features, enabling you to derive the best insights from your Jira data.
Polina-DevAcrobats-
Business Analyst
DevAcrobats
Sofia, Bulgaria
2 accepted answers
1 comment