# Creating a New Rule
Adding new Seatbelt is easy. Once you are in rule manager page, click Add Rule
button in the top right corner.
# Rule Severity
There are four possible results of running a rule: Error
, Warning
, Info
and Pass
. Pass
indicates that there weren't any result captured by the rule; Error
, Warning
and Info
indicate that the rule found data that was filtered by the rule; You can set the severity of each result type to determine how it will be indicated in the rule results. For example, you can set severity to Error
so that any errors will be highlighted in red. You have complete control over how your rule results are displayed.
# Rule Category
Have you ever looked at your Jira data and felt overwhelmed? If so, you're not alone. With all of the information available, it can be tough to know where to start. Luckily, there are a few ways to organize your Jira data and make sense of it all. There are Integrity
, Policies
and Health
categories defined for you to organize and group your rules by its purpose. For example, you might have a set of rules for integrity checks, a set of rules for policy enforcement, and a set of rules for health monitoring. This can help you keep track of what each rule is supposed to do and make sure that they're all working as intended.
# Example queries
Seatbelt rules use PrestoDB to query your Jira data. Here are some examples
Issue completed with no resolution
SELECT
id
FROM issues
WHERE
fields.status.statusCategory.name = 'Done' AND
fields.resolution IS NULL
ORDER BY fields.updated ASC
Sprint expired but not closed
SELECT
id
FROM sprints
WHERE
from_iso8601_timestamp(enddate) < current_date AND
state = 'active'