My main goal is to be able to retrieve the information that is displayed on the user profile in Jira and apply those values within a Jira ticket, so when a ticket is created, this info is auto-populated in assigned custom fields. However, despite our Jira Cloud being synced with AzureAD, this info is not retrievable through automation. An alternative found way is through API.
I have created an Automation that basically does the below:
When: Issue is created
Then: Create Variable
- - Variable name: ReporterEmail
- - SmartValue: {{reporter.emailAddress}}
AND: Send Web Request
- - HTTP Method: POST
- - Web Request Body: Custom Data
- - Custom Data: Clientcredentialsandsecret
- - Header:
- Key: Content-Type / Value: application/x-www-form-urlencoded
AND: Create variable
- - Variable name: AccessTokenTest
- - Smart Value: {{webhookResponse.body.access_token}}
AND: Send Web Request
AND: Add value to the audit log.
- - Log message: {{webhookResponse.body}}
AND: Edit issue - Jobtitletest: {{webhookResponse.body.jobTitle}}
The automation runs successfull, but unfortunately it populates the customfield with literally the value "{{webhookResponse.body.jobTitle}}". The expected result was that it would retrieve the jobtitle from the webhook's response body, but it didn't. How can I achieve this? Again to reiterate, my goal is to map the user info that you can see in the User Profile within Jira, to custom fields within a ticket, every time a ticket gets created within the ITSD project. I do not want to use third party apps of any kind because we don't have the budget for that. Please help and apologies in advance if I didn't explain properly.