Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,557,819
Community Members
 
Community Events
184
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
Atlassian Team members are employees working across the company in a wide variety of roles.
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
Atlassian Team members are employees working across the company in a wide variety of roles.
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
AUG Leaders

Atlassian Community Events