https://support.atlassian.com/opsgenie/docs/action-filters-in-opsgenie-integrations/
Action filters in Jira Service Management integrations
A filter is a set condition. Many features of Jira Service Management use filters to provide action execution based on some conditions. You can customise to process integration actions with certain incoming data, fire callbacks for particular types of alerts, apply policies to certain alerts, and do a lot more.
For example, Jira Service Management processes all incoming data from integrations, and then it checks them against your integration's actions for execution. Remember that integration actions have a processing order. At most one action can execute on a single webhook. A filter has a condition set. If the first action's Filter does not match the incoming webhook data, Jira Service Management moves to the next action in line. It then evaluates this action's Filter. If an action's Filter matches the data, Jira Service Management executes that action. Then it ends the processing on that particular webhook. If it finds no matching action, nothing happens.
The figure below shows a Create Alert action's Filter. Its condition match type is set to 'Match one or more conditions below'. In the incoming data if the variable 'Status Message is equal to 'Failed' or 'Still Failing', then Jira Service Management creates an alert according to the setup specified in the Alert Fields. The processing will end there.
But if an incoming data with 'Status Message' equal to something other than these comes to Jira Service Management, it will check it against the Create Alert action. When that doesn't match, the Filter of the Close Alert below will process.
Jira Service Management provides default actions with pre-configured Filter and Alert Fields for every integration. You have the option of customizing them any way you like: you can edit them, delete them or add new actions of your own.
There are different types of 'condition match type' that you can choose from:
Match all alerts: The integration action will match every data that's evaluated against it and execute the action. You don't need to specify any condition when selecting this option.
Match one or more conditions below: If even one of the conditions specified in the condition set matches the incoming data, Jira Service Management executes the integration action.
Match all conditions below: The webhook data has to match every specified condition in the condition set. If any of them fails, the action isn't executed. Jira Service Management moves on to process the next integration action, if there is any.
If you select 'Match one or more conditions below' or 'Match all conditions below', you'll need to specify a list of conditions for evaluation. A single condition looks like:
The four boxes denote in order:
The variable in the specific integration's webhook data to evaluate.
'Is' or 'Is Not' clause.
The functional operation that the variable is expected to comply. The set of operations you can choose from changes according to the type of the variable.
The value field the incoming data is expected to match.
You can add new conditions to the condition set by clicking on the plus sign, or delete using the bin sign. Remember that all the changes you make will apply after you save the changes.
Condition Operations
Equals
It is applicable for String, Boolean and Number variable types. It returns true if the specified variable's value and the expected value are the same.
Contains
It is applicable for String, List and Map types. It returns true if the specified variable's value contains the expected string. For maps, expected value can be contained by key or by value fields.
Is Empty
It is applicable for String, List and Map types. It returns true if the specified variable is empty. For string it checks character count, for list and map, it checks size.
Matches (Regex)
It is applicable for String, List and Number types.
For String and Number types, it returns true if the specified value matches the given regular expression.
For List types, it returns true if any of the given values matches the given regular expression.
Regex match operations has 10 seconds timeout limit. If it takes more than 10 seconds, it returns false.
Contains Key
It is applicable for Map type. It returns true if the specified variable contains the expected value in keys.
Contains Value
It is applicable for Map type. It returns true if the specified variable contains the expected value in values.
Starts With
It is applicable for String type. It returns true if the specified variable starts with the expected value.
Ends With
It is applicable for String type. It returns true if the specified variable ends with the expected value.
Greater Than
It is applicable for Number type. It returns true if the specified variable is greater than the expected value.
Less Than
It is applicable for Number type. It returns true if the specified variable is less than the expected value.
Equals Ignore Whitespace
It is applicable for String type. It returns true if the specified variable is equal to the expected value after removing all whitespace(space, tab, new line, carriage return characters) from both the specified and the expected value.
Alert Fields section
For any action set up for an integration, an Alias must be defined and match exactly in order for the action to be executed. The Alias field is a user-defined unique identifier for "open" alerts. Also used in de-duplication, integrations are unable to be saved if an Alias field is left empty, nor will actions be functional.
Was this helpful?
YesNoProvide feedback about this article
Additional Help
Learn how to use Jira Service Management’s integration framework
Action filters in Jira Service Management integrations
String processing methods in Jira Service Management integrations
Share your feedback
We would love to receive feedback about this documentation, the product experience, functionality, or anything you’ve got to share.
(Simpler: Do you have any feedback about this documentation, your product experience, or any functionality? We'd love to hear from you.)
You can either add comments to this page or add a card on the Trello board.
Criteria for checks
- Replacing OG with JSM
- Basic grammar & spell check
- US English
- Positive language
- Removing passive voice (wherever necessary)
- Simplifying sentences
- Change V&T
- Replacing old links with new ones
Add Comment