Linking Issues with is blocked by type
Created by: diogorb
At /rest/api/2/issueLinkType there is only the BLOCKS as main link type. Depending on wich side is INWARD, the relation name is changed (blocks or is blocked by):
{
id: "10000",
name: "Blocks",
inward: "is blocked by",
outward: "blocks",
self: "https://XXXXX.atlassian.net/rest/api/2/issueLinkType/10000"
}
I need to create a relation of IS BLOCKED BY from ISSUE A to ISSUE B and i´m using like this:
jira.create_issue_link(
type="is blocked by",
inwardIssue=linked_issue,
outwardIssue=issue.key,
comment={
"body": "Linking '%s' --> '%s'" % (issue.key, linked_issue),
}
)
I checked that at your implementation when a type is the same as INWARD, you change the issueIN with issueOUT:
elif lt.inward == type:
# so that's the reverse, so we fix the request
type = lt.name
inwardIssue, outwardIssue = outwardIssue, inwardIssue
break
Result, i can´t make a relation called is blocked by where i need to. The is blocked by side is always been changed to "DESTINATION SIDE"