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
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:
As you can see, the custom field is nested, so I could use something this below to extract it:
{{_payload.issue.fields.customfield_10048}}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thankyou for the respon @Nick Haller i had already tried as yours but still don't get the value.. is there any solutions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 Haller
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.