Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to fetch the "Fields" value in Webhook from Issue Linked Event in Project Automation

Deleted user October 17, 2022

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.

automation_rule.pngautomation_rule2.png

I am attaching the screenshot of fields value received in webhook:

ss1.png

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

1 answer

1 accepted

1 vote
Answer accepted
Stefan Salzl
Community Champion
October 17, 2022

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

Deleted user October 17, 2022

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?

Stefan Salzl
Community Champion
October 18, 2022

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

Deleted user October 18, 2022

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?

Stefan Salzl
Community Champion
October 19, 2022

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events