Using a jira board to track assets. Some assets come in a kit and the idea was to have the kit components as sub-tasks under one main issue for the kit. When the kit is moved to 'in progress' the subtasks are still linked to the kit, but when the kit is moved back to 'To Do' the subtasks are no longer linked to the parent kit issue
Update:
May be because one of our groovy scripts remove links from the the parent issue. Is a Subtask considered a link and if so what type?
Are the issues really sub-task issue types or are the other issue types linked to the main issue?
Do you have the issue key for one of those sub-tasks that has disappeared? If so, try browsing for it to see if the issue actually still exists and has been modified or has truly been deleted.
the issues are really sub-task issue types and the sub-tasks are not deleted they just have no parent anymore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
```
IssueLink link in linkMgr.getOutwardLinks(issue.id){
linkMgr.removeIssueLink(link, roboUser)
```
Does this include sub-tasks if linkMgr = ComponentAccessor.getIssueLinkManager()?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only way to do that is with code that removes the parent issue, forcibly, overriding the relationship that Jira enforces.
It is also possible to hide the relationship, which makes them look orphaned, but you can't do that in the workflow, you have to change the parent's issue type!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, cross commenting. Yes, that would damage the sub-task relationships - part (not all) of it is stored as (an invisible) issue llink.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ya sorry about the two cross comments, thought the other would be a little simpler.
If I were to add an if statement that checks for a subtask link could i do something like this:
if link.issueLinkType.name == subtask //<-- Not sure what linkType this would be
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My fault just as much as yours! We can't know when someone else is going to post!
Yes, that's a good way to do it.
Issue link types are stored in a database table that looks like this on a mostly untouched new Jira, so my guess is that you'll see the entry in the linkname column
id | linkname | inward | outward | pstyle |
10100 | jira_subtask_link | jira_subtask_inward | jira_subtask_outward | jira_subtask |
10000 | Blocks | is blocked by | blocks | NULL |
10001 | Cloners | is cloned by | clones | NULL |
10002 | Duplicate | is duplicated by | duplicates | NULL |
10003 | Relates | relates to | relates to | NULL |
10200 | Epic-Story Link | has Epic | is Epic of | jira_gh_epic_story |
10201 | Problem/Incident | is caused by | causes | servicedesk_automation_default_linktype |
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.
Welcome to the Atlassian Community!
This suggests an automation or script (post function or listener) that is deleting or changing the parent of the sub-tasks such that they disappear from the parent issue.
Check with your admins what they have set up in the project, or listeners.
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.