Hi All,
I am looking for a database table relation/information for parent id of an sub-task, I would like to build a query to get the parent id(jira issue number) which is associated to the sub-task.
I think it is in the issuelink with the linktype of either subtask or Parent/Child. The source and destination are the issue ids of the parent and child (subtask) issue. Sorry for the lousy formatting but the bestway to confirm this is to play about with a test DB and Jira
mysql> desc issuelink;
+-------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| ID | decimal(18,0) | NO | PRI | NULL | |
| LINKTYPE | decimal(18,0) | YES | MUL | NULL | |
| SOURCE | decimal(18,0) | YES | MUL | NULL | |
| DESTINATION | decimal(18,0) | YES | MUL | NULL | |
| SEQUENCE | decimal(18,0) | YES | | NULL | |
+-------------+---------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
mysql> select * from issuelinktype;
+-------+-------------------+---------------------+----------------------+------------------------+----------+
| ID | LINKNAME | INWARD | OUTWARD | pstyle | POSITION |
+-------+-------------------+---------------------+----------------------+------------------------+----------+
| 10000 | Blocks | is blocked by | blocks | NULL | 1 |
| 10001 | Cloners | is cloned by | clones | NULL | 2 |
| 10002 | Duplicate | is duplicated by | duplicates | NULL | 3 |
| 10003 | Relates | relates to | relates to | NULL | 4 |
| 10100 | jira_subtask_link | jira_subtask_inward | jira_subtask_outward | jira_subtask | NULL |
| 10200 | Epic-Story Link | has Epic | is Epic of | jira_gh_epic_story | NULL |
| 10201 | Parent-Child Link | is child of | is parent of | jira_jpos_parent_child | NULL |
+-------+-------------------+---------------------+----------------------+------------------------+----------+
7 rows in set (0.01 sec)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matt,
Thank you for your response, I am trying to get the parent issue number from a sql query.
Here is the thing, when I export issues from the JQL filter, under Parent ID column I get an ID which is a Jira issue, I need to query in the DB to get the Jira Issue Number such as ABC-123
ABC-123 is the parent task of ABC-128.
ABC-128 is the jira sub-task issuetype
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.