Hello and thank You kindly in advance.
Using a JSM automation that is passing JSON data to a webhook. In the automation, I have the following custom code:
{
"issueKey": "{{issue.key}}",
"summary": "{{issue.summary}}",
"requestType": "{{issue.Request Type}}",
"issueUrl": "{{issue.url}}",
"approvalId": "{{approval.id}}",
"approvers": "{{issue.Approvers.accountId}}"
}
When passed to the target schema, the outputs line up perfectly EXCEPT the approvalId data. Every other variable at the target is filled in correctly. Only the approvalId variable is NULL.
I've tried changing the target schema to look for type 'int' instead of 'string', but see that the webhook JSON is sending 'string' for that variable, so the 'string' seems correct.
I've tried changing the smart value in the JSM automation to {approval.id} / {approvalId} / {approval} . Nothing seems to get passed into the webhook, as if none of those are the correct smart value for JSM.
ex:
ANY thoughts are appreciated. I couldn't find info on this specific {approval.id} smart value on the JSM smart value page, informative as it was.
Take care and be well!
Have you already take a look at the following reference page - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--approval--
Also, you can find out all the fields' smart value associated with your issue by following this reference page -
https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Hope this helps..
Best, Joseph
Hi Joseph!
I did check out those pages, which got me closer, but still missing the "approvalId" smart value.
In the target app that is looking for the updated webhook, it sees the following data in the webhook (redacted for security.) We can see that every other variable in the webhook has correct data. Except for the "approvalId" spot, which is an empty string.
As if I might not have the smart value right in the 1st place.
This also verifies that the webhook data content-type is JSON (had to manually type that into the additional info of the JSM automation).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Without seeing all the details of your rule and audit log, I wonder: what is the trigger for your rule? The {{approval}} smart value is only populated with the approval-related rule triggers:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--approval--
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, I can share what the automation trigger looks like.
But even on that page You shared, it doesn't mention {approval.id} unless the Approval ID is one of these other smart values?
To clarify, when the ticket status is set to [APPROVAL PENDING], and those conditions are applied, POST that data in the webhook. The other variables are successfully filled in except "approvalId".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Reviewing the documentation from that link, the two triggers which support the {{approval}} smart value are:
Additionally, the documentation does not show an id attribute, while it does show others. Please note that not all attributes are in the documentation; often experimentation is required to find the others.
Where did you find {{approval.id}} documented?
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.