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,560,626
Community Members
 
Community Events
185
Community Groups

Custom fields how to identify them

Hi there,

We have a Request form that is being used as part of a JSM Portal Configuration. When an issue is logged via the portal, an alert is created in Opsgenie. We have configured the integration to display some fields in the alert that is created. We identified the custom field by adding {{_payload}} to the description field as suggested in this forum. I now want to display other custom fields from the request form in the alert e.g email address and contact number - but am not seeing these in the payload when the alert is created.

Any help on how to identify the custom fields number?

Thanks,

 

Carol

3 answers

1 accepted

0 votes
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 15, 2022

Hi @Carol Saldanha ,

If you are parsing the entire {{_payload}} to the description field, and custom fields from the request form in the alert e.g email address and contact number are not shown, then I'd assume they are not sending from Jira / JSM to Opsgenie.

Are you not seeing these fields at all in the Opsgenie alert? Have you tried a Crtl + F for the expected value? 

 

I typically take the entire payload and use a JSON formatter to determine what you might need to extract the field or value:

cf1.1.jpg

cf2.1.jpg

vf3.1.jpg

 

As you can see, the custom field is nested, so I could use something this below to extract it:

{{_payload.issue.fields.customfield_10048}}

 

cf4.1.jpg

Thank you  - that was very helpful. The issue was that the fields I was sending from a form were not linked to JSM custom fields hence not being sent in the payload (as you suggested)

I have access to them now.

Many thanks,

Carol

Like Nick H likes this

Hi @Nick H is it possible to extract the value of this nested fieldUntitled.png

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 04, 2023

This Community Article should help with extracting that: How to Extract Custom Fields and Data into an Alert

If I had to guess, you may need something like this to extract that field into the alert:

{{customFields.customfield_10072.name}}

Thankyou for the respon @Nick H i had already tried as yours but still don't get the value.. is there any solutions?Untitled.png

actually i want to retrieve not only when issues are created, but also updated or resolved. i've problem in this.. the payload is only show fields when issue is created @Nick H 

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 04, 2023

It's only possible to extract the fields when the issue is created. 

The field you highlighted in your screenshot differs from the one I had suggested above, and includes "_payload"

Please try with these:

{{customFields.customfield_10072}}

{{customFields.customfield_10072.name}}

Hi,

Thanks for the reply, but i don't see the custom fields when I try that. The custom field that I can see in the payload for the Opsgenie alert doesn't show up when I try and search using the method you've suggested above.

I think I need to find out why some custom fields are being dumped in the payload and some are not.

 

Any help would be appreciated.

 

Carol

0 votes
Thuan_ Do Dang
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Aug 15, 2022

Hi @Carol Saldanha ,

To get your custom field number, you can go to advance issue search with JQL -> type your custom field name -> see the suggestion, cf[xxxxx] is your custom field id -> customfield_xxxxx is your field in smart value.

find custom field id.png

Hope this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events