Is a subtask on a parent issue considered a link on that parent issue?
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if i was only trying to remove links and leave sub-tasks attached to the parent could that be done?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.