How to use JIRA custom fields in opsgenie alert rules?
Asked by joana:

I am managing a JIRA integration with Opsgenie to create and route the alerts to certain teams when a JIRA issue is created in a specific project.

To help on routing the issues to the teams I'm using a custom field on JIRA. How can I use that field in the alert filter rules?

Its very frustrating because only the issue standard JIRA fields appear...

<br />

![Screenshot 2022-03-29 at 09.01.46.png](https://community.atlassian.com/t5/image/serverpage/image-id/190379i3922DB4E69F7BE3E/image-size/large?v=v2&px=999 "Screenshot 2022-03-29 at 09.01.46.png")

I've read similar posts but don't understand the solution proposed of adding the value of the field into one of the alert fields because then its not clear where should the action of assigning to a team be placed.

In this question, <https://community.atlassian.com/t5/Opsgenie-questions/Assign-alert-to-appropriate-team-selected-from-JSM-custom-field/qaq-p/1853852> its proposed to use another rule for Alert updated. Is that correct? I'm sorry but the comments are not very clear...


Answers:
author: Nick H
body: Hi [@joana](/t5/user/viewprofilepage/user-id/4844710) ,

*"To help on routing the issues to the teams I'm using a custom field on JIRA. How can I use that field in the alert filter rules?"*

This unfortunately is not possible through the Jira integration - since like you mentioned - the integration can only filter on the standard Jira issue fields.

Are you by chance using a [Jira webhook](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira/#Configuration-in-Jira) to create alerts in Opsgenie? If yes - then you should be able to filter on the custom field of the webhook in the JQL section. What might make the most sense is creating a webhook for each custom field, and send each to its own specific webhook/integration.

For example, if custom field \~ "ABC" trigger the webhook/integration assigned to Opsgenie team ABC. If custom field \~ "XYZ" trigger the webhook/integration assigned to Opsgenie team XYZ. Etc.

![cf1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/190515i6EF6D03748F0A2E8/image-size/large?v=v2&px=999 "cf1.jpg")

comments: author: joana
body: Thank you for your detailed reply. I am using the new Opsgenie Jira integration and not the legacy one, but I'll try using the legacy with your instructions.

Is there any plans for development on improving the integration with more features? Is there anywhere I can vote for that feature? I would say that in our use case, one of the benefits of using opsgenie was that we stayed within the same ecosystem but if Jira is treated like other third party products there's really no advantage for using together atlassian products and users may go to other solutions in the market... :(


author: Nick H
body: Hi [@joana](/t5/user/viewprofilepage/user-id/4844710) ,

I'm unsure if this is on any roadmap, but I've entered a feature request for this that can be followed here: <https://jira.atlassian.com/browse/OPSGENIE-338>

There is a workaround listed at the bottom as well if you still want to use the new Jira / JSM framework, but the workaround would work for both the older and newer framework.