Forums

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

JIRA DB: How to get the epic issuenum of an issue?

Benjamin chee_guoee March 28, 2019

Hi Community!

I am building a query in the JIRA DB to get the Epic Issuenum for an issuetype in the DB.

I need help getting the Epic issuenum that is related to the particular issue.

 

2019-03-28_14-52-03.png

SELECT * FROM jiraissue ji
left join customfieldvalue cfv on (ji.id = cfv.ISSUE)and cfv.CUSTOMFIELD = 10332 -- Experty
LEFT join customfieldoption cfo ON cfo.id = cfv.STRINGVALUE
WHERE ji.issuetype = 10300

 ji.issuetype = 10300 are issues "TaskDEV" in the company. 

 

Current Query works well to get me issues related to issuetype 10300, but I need to get the Epic that is related to this issue as well, specifically the issuenum of the Epic.

 

Any help is much appreciated!

 

Thank you very much!

1 answer

0 votes
Mohamed Benziane
Community Champion
April 8, 2019

Hi @Benjamin chee_guoee 

 

Can you look at this post : https://community.atlassian.com/t5/Answers-Developer-Questions/Where-are-quot-Epic-link-quot-records-stored-in-JiraDB/qaq-p/523554

Like Nic Brough said, avoid using the database and use rather the API. 

Suggest an answer

Log in or Sign up to answer