Skip to main content

Issues and PRs > Labels

Tom Williams avatar
Written by Tom Williams
Updated over a week ago

Dataset: Issues & Pull Requests

Entity: Pull Requests, Issues

Field ID: label_names

Type: List of text values

Description: The list of labels assigned to the item. Labels are app-specific and case-sensitive.

Source: App

Transformation logic: N/A

From:

Github (PRs, Issues)

labels

Gitlab (PRs, Issues)

labels

Bitbucket (PRs)

N/A

Azure DevOps (PRs, Issues)

labels (also named tags in the UI)

JIRA (Issues)

labels + [issue_type] (same as labels)


⚠️ deprecation: the issue_type will be removed from the list of labels. Use metatags instead of labels if you want to keep this behavior.

ClickUp (Issues)

tags + [priority]

Trello (Issues)

labels + [column_name]

⚠️ deprecation: the column_name will be removed from the list of labels. Use workflow_status in combination with labels if you want to keep this behavior.

Reporting Use Cases

The Labels field is one of the most powerful for categorizing and analyzing your work. As a list of strings, it allows for flexible filtering, advanced grouping, and detailed metrics that can help you understand the nature of your team's efforts.

  • Filtering and Scoping: You can create highly specific reports by filtering on the presence, absence, or number of labels.

    • Inclusion/Exclusion: Use the contains operator to find all items with a specific label (e.g., Labels contains "bug"), or the does not contain operator to exclude them. You can also filter for items that contain any of or all of a given set of labels.

    • Process Compliance: Identify work that is missing categorization by creating a report where the number of labels is zero, using a filter like Labels length = 0.

  • Reporting on Individual Labels: To accurately count or group by individual labels within the list, you must use the FLATTEN function. This is a key technique for label-based reporting.

    • Label Popularity: Create a bar chart showing the most frequently used labels by setting the dimension to the custom formula FLATTEN(label_names) and the metric to COUNT(). This approach un-nests the list and counts each label's occurrence individually.

  • Custom Formulas for Advanced Categorization: The real power of labels comes from using them in custom formulas to create higher-level groupings that match your business logic.

    • Work Type Analysis: You can categorize all your work into broad types like "Bug", "Feature", or "Maintenance" with a dimension formula like IF(CONTAINS(label_names, "bug"), "Bug", CONTAINS(label_names, "feature"), "Feature", "Maintenance").

    • Prioritized Labeling: When items have multiple labels, you can pick the most important one for reporting. The ARRAY_FIND function is perfect for this. A dimension with the formula ARRAY_FIND(label_names, "severity:critical", "severity:high", "bug") will categorize an item by its most critical label.

    • Conditional Metrics: You can create KPIs that compare different types of work without filtering the whole widget. For example, in a single report, you could have one metric for COUNT_IF(CONTAINS(label_names, "bug")) and another for COUNT_IF(CONTAINS(label_names, "feature")) to see the ratio of bug fixes to new features.

Did this answer your question?