Forums

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

Distinguish between subtask created and issue linked

kumargaurav-tudip
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 26, 2020

Hi All,
For my project I have to use the webhook "issuelink_created". I need this webhook to be fired when a task is converted to a subtask in JIRA. The problem is, the webhook is also fired when a new subtask is created.
The response of webhook when the issue is linked is:

{
  "timestamp": 1585209380037,
  "webhookEvent": "issuelink_created",
  "issueLink": {
    "id": ***,
    "sourceIssueId": ***,
    "destinationIssueId": ***,
    "issueLinkType": {
      "id": ***,
      "name": "jira_subtask_link",
      "outwardName": "jira_subtask_outward",
      "inwardName": "jira_subtask_inward",
      "style": "jira_subtask",
      "isSubTaskLinkType": true,
      "isSystemLinkType": true
    },
    "sequence": 6,
    "systemLink": true
  }
}

 and the response when a new subtask is created is:

{
  "timestamp": 1585209275940,
  "webhookEvent": "issuelink_created",
  "issueLink": {
    "id": ***,
    "sourceIssueId": ***,
    "destinationIssueId": ***,
    "issueLinkType": {
      "id": ***,
      "name": "jira_subtask_link",
      "outwardName": "jira_subtask_outward",
      "inwardName": "jira_subtask_inward",
      "style": "jira_subtask",
      "isSubTaskLinkType": true,
      "isSystemLinkType": true
    },
    "sequence": 5,
    "systemLink": true
  }
}

What does the 'Sequence' field specify? Can I use this field to distinguish? Any kind of help is appreciated.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2020

Hi @kumargaurav-tudip -- Welcome to the Atlassian community!

Did you figure out this issue yet?

From the automation rule perspective, I saw the same challenge that a Convert to... action cannot be accurately detected for changing to/from a sub-task as a trigger.  I created a defect for this issue for automation triggers.

 

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer