The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Is a subtask considered a link and if so what type?

Steven VanderVelde
August 9, 2022

Is a subtask on a parent issue considered a link on that parent issue?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Nic Brough -Adaptavist-
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 Champions.
August 9, 2022

No, they're not considered to be issue links.

In the background, sub-tasks and issue-links have a lot in common, but because sub-tasks are a fragment of an issue and links show a non-hierarchical relationship between two issues, they look and behave very differently.

Steven VanderVelde
August 9, 2022

so if i was writing a groovy script:

linkMgr = ComponentAccessor.getIssueLinkManager()
for (IssueLink link in linkMgr.getOutwardLinks(issue.id)){

...

}

the for loop would not include sub-tasks if the issue.id is the parent?

Nic Brough -Adaptavist-
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 Champions.
August 9, 2022

It might, but I cannot remember.

Sub-tasks are partially stored as an issue link type, one that is hidden from the UI.  I can't remember if the API is clever enough to ignore them when you use that code.  I'd recommend ignoring them in your script though, you need to do some extra stuff in other places if you're changing parent/sub-task links.

Steven VanderVelde
August 9, 2022

if i was only trying to remove links and leave sub-tasks attached to the parent could that be done?

Radek Dostál
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 Champions.
August 9, 2022

IssueLinkManager will not get or remove subtask links - Jira does not consider them as issue links.

Subtasks go through https://docs.atlassian.com/software/jira/docs/api/8.22.6/com/atlassian/jira/config/SubTaskManager.html