Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,292
Community Members
 
Community Events
165
Community Groups

Jira Service Management integration custom field

Hello, when an Alert is created in Opsgenie, I've set up the integration to create a Jira Service Management Issue. However, I'm having trouble populating an Issue's custom field named Category.

I've tried each of these without success.

image.png

Ideally, I'd like to populate this field with a constant value, i.e. Category=Foo. Is this possible?

Finally, which one of these should I configure, and does the order matter?

image.png

1 answer

1 accepted

1 vote
Answer accepted
Nick H Atlassian Team Jul 13, 2021

Hi @wes.saunders ! 

Realistically it would depend how this custom field is parsing in the payload, but we typically see one these options working fairly consistently:

  • {{_payload.issue.fields.customfield_13154.value}}

  • {{_payload.issue.fields.customfield_13154.substringBetween("value=",",")}}

    • ^ Where this pulls the string between value= and ,

To see how this custom field parses in the payload, you may want to add {{_payload}} to the Create Alert action(s) Description field. Sometimes the payload will be truncated in the Logs, but should parse entirely in the alert' Description - since it can parse up to 15k characters.

 

As for which one of those Create Alert actions you should configure, you can configure or edit any one of them. That also would depend on what your use-case is, and which issues should (or should not) create Opsgenie alerts. By default we offer those three actions because they meet most standard workflows, and create Opsgenie alerts for when new JSM issues are created - depending on their status, webhook event, etc.

Order of those actions does matter too! Opsgenie will evaluate them from top >> down, and when an action's filter/conditions are met, execute the action.

 

Hope this helps! Let us know if you have any other questions, issues, etc. If you'd like to also test with the {{_payload}} suggestion above, and share a screenshot of the alert following with the custom field, we could provide further suggestions.

Thanks for the quick reply, Nick! I've added {{_payload}} to the Description field, but since Opsgenie is creating the Alert and sending to JSM, this isn't yielding anything useful. It appears the custom field I'd like the Alert to set in JSM is a drop down, and not text, which might be the issue?

Screen Shot 2021-07-14 at 9.24.10 AM.png

Nick H Atlassian Team Jul 14, 2021

Ahh, I misread the initial part of the question, didn't realize this workflow was Opsgenie >> JSM.

Those dynamic fields are only used to extract data from JSM when an issue creates an Opsgenie alert. Those will not map to custom fields when an Opsgenie alert creates a JSM issue.

The only way this is possible is through OEC: 

https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira-service-management/#Integration-via-OEC--for-On-Premise-Jira-Service-Management-Usage-

^ Although our doc says OEC is for on-prem instances, it can be used for cloud as well. 

With this, you would install the OEC service on a server, and it will sit in the middle of Opsgenie and JSM. Opsgenie alerts would send to OEC, which will then execute a script to create the issue in JSM. You can modify the OEC script to customize things such as configure it to set an Opsgenie alert field as a required custom field in Jira.

Like Steffen Opel _Utoolity_ likes this

Hi !

I wonder if there any update has been released recently for the cloud application.
Before July 19th, I was able to add a tag "A" to Opsgenie alert and it creates a issue of type "B" in JSM.

In the Opsgenie alert, there are custom field and it was imported on the JSM issue.
However, since mid July let's say, It doesn't work anymore :'(

If I understand well, I have to use Opsgenie Edge Connector now ?

Thanks by advanced :)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

171 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you