Hi Team,
We are trying to call a webhook on "Issue Linked" event using Automation available in Project Settings tab.
We are not able to see the fields value when we to send the value to webhook.
I am attaching the screenshot of Automation rule and the custom data we are trying to send to webhook.
I am attaching the screenshot of fields value received in webhook:
Can anyone please let us know why we are not able to get the "fields" value in webhook as expected whereas when we send the complete Issue data instead of custom data, we are getting all the details as expected.
Thanks & Regards,
Preethi H R
Hi @[deleted] ,
What the rule in your screenshot is trying to fetch are smart values provided from the issue from the trigger. Smart values do not exactly provide the same data than an api call. According to this documentation "fields" is not a provided smart value of an issue.
I don´t know the whole use case/requirement/problem you are trying to solve. In case all fields of an issue are needed there could be done an api call (send webrequest) before your webhook call to fetch all data/fields of your required issue and provide the required data from your response in the webhook.
Best
Stefan
Hi @Stefan Salzl ,
Thank you for the documentation you have shared. Indeed, it is helpful. Can you please help me in knowing if we can fetch details of only issue link which triggered the event using smart values?
Currently if we get the complete Issue Data, we are able to get all the issue links currently linked to the project. But if I want to fetch only the data of issue link which triggered the IssueLinked Event, how can I fetch that data using smart values in Jira?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
you are welcome ;)
Could please explain the problem you´d like to solve from a functional/use case perspective (wihtout mentioning the technical solution). (eg. in a given-when-then scenario)
Furthermore I got you so far that the trigger is a issue-linking. Please keep in mind that the issue linking is an event that covers 2 issues (the source and the destination issue which goes hand in hand with inward-outward link type). Please add this information to your use case description in order to find a solution that solves your problem/fullfills the requirement.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stefan Salzl ,
I wanted to fetch the following data when IssueLinked Event occurs and send it to Webhook link given in automation
{
"sourceIssueId": "456333",
"destinationIssueId": "527607",
"sourceProjectId": "457876",
"sourceProjectKey": "SAMSUNG",
"issueLinkType": {
"id": 10100,
"name": "jira_subtask_link",
"outwardName": "jira_subtask_outward",
"inwardName": "jira_subtask_inward"
}
}
Can you please let me know how do I fetch these using Jira smart values?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted] ,
This is still a technical description of what you expect to do.
Unfortunately the native jira automation (A4J) can´t provide all of these with via smart value. Though the trigger of the automation rule is "when issue is linked" the context of the rule is not the event (like it would be in a listener with scriptrunner) but the issues that are involved in this action/trigger. So you could list all issuelinks of whether the sourceIssue or destinationIssue but the trigger doesn´t send the event itself.
If this is only needed for specific link types this can be done with specific rules for the specified linktypes.
If this should be gneric than this would need more effort by getting this data via the restAPI which would need some coding skills.
Best
Stefan
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.