I am having troubles using a JIRA Automation Incoming Webhook trigger in order to create an epic.
My webhook passes a project key.
I am not sure how to transform that key into a "real" project object/reference that I can use to set into the required project property when creating an epic via a "Create Issue component" in my automation.
I have tried using the Rest API to retrieve a project which I do successfully get, but I am not sure what part of the response is equivalent to a "real project". I have tried {{webhookResponse.body}} and assigned that to the project property during epic creation, but that fails with a message of "Error creating issueproject is required (project)".
So basically, I am unsure of how to turn a string of a Project key (ie "PROJ1") into an actual reference that I can use in the required project property when creating an Epic in an automation rule.
I appreciate any help or direction anyone has to offer :)
I believe you will need to review the content of your response to find the path to your field. To help, I send an email to myself with the entire {{webhookResponse}} to review; it does not fully display in the audit log, so the email reveals it completely.
Recently I had a similar challenge when calling the Jira REST API from the web request action in an automation rule. To access my custom field I used:
{{webhookResponses.body.issues.fields.myCustomFieldNumber}}
If you have just one record in the response, you are all set.
If your response contains multiple values, that will return what appears to be a CSV list (e,g. [23, 17, 1, 15] ), but I was unable to parse it as a list within the rule. As a work around, I stuck that value into a Created Variable, and then used the string split() and list iterator to get at the field values I wanted.
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.