How do I link initiatives to epics like I can link epics to stories in the Jira database?

Daniel Brownfield April 18, 2017

We created a custom field called 'Parent Link' to create the hierarchy Initiative > Epic > Story and use Initiative as the parent.  However, in the jiradb.customfieldvalue table, the 'custom field' of parent link does not exist for epics I know have a parent link to an initiative in the Jira UI.  

What I want to know is, how does Jira link Epics to the custom field of 'Parent Link'?

2 answers

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 18, 2017

You don't.  You should not be looking at the database, because the absolutely minimum actions you have to take to do this linking involves stopping JIRA and taking a full proven backup before changing it, and then re-indexing after restarting.

That's not feasible for running a system that people need to use.

Could you explain what the external system trying to do this linking is doing and maybe why you have not looked into doing it over REST?

Daniel Brownfield April 19, 2017

Nic, we are not attempting to manipulate the data in the database, just query it.  We would like to generate a report with the hierarchy for each story/task/subtask from the smallest level up to its initiative.  

Right now the JQL queries we run don't return the data we need so we had to look at the database.  

As for doing it over REST, we have not looked down that route.  Would we be able to query JIRA to obtain the same data as querying the database?

Marina Veselić April 26, 2018

Hi!

We have the exact same problem! We have the report on all hours logged on an Epic and it's issues and subtasks. We did that on data collected from the database. I am also wondering how can we get that information on the added hierarch level Initiative. Where, in the database, is written which epics belong to each inititaive?

So, we don't need to alter the database, just collect the data. 

Any help will be appreciated!

Cheers,

Marina 

narendra k August 13, 2018

Hey @Marina Veselić 

Did you get the solution? I have the same requirement.

Marina Veselić August 21, 2018

@narendra k Unfortunately, not... We are looking into Structure for Jira nad BigPicture as alternatives, and hopefully, won't be in need to pull reports from the database...

0 votes
Steven F Behnke
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 Leaders.
April 18, 2017

Parent Link is created automatically by Portfolio for JIRA. If you created the field manually, you did it wrong. It is NOT a normal Custom Field: It is a Plugin provided Field.

Daniel Brownfield April 19, 2017

Steven, yes we have Portfolio which caused us to create the Parent Link field.  The frustration is that although it is not a normal 'custom field', it was created like other 'custom fields' but it does not show up as a value even when Parent Link is active on an issue.  Since we cannot find a reliable link to that field in the Jira tables or in the Portfolio tables, I reached out to here to see if anyone knows how to utilize that Parent Link field whether through the plugin's tables or Jira's.  

Andrew Pirkola November 26, 2018

I had a similar problem and found what appears to be a reliable source of the data. The syntax is SQL Server and could be improved by using the JSON functions if you're on SQL Server 2016 or later. I'm not, so I'm just using some much slower string comparison.

 


SELECT
[parent].[ID] AS [Portfolio Parent],
[child].[ID] AS [Portfolio Child]
FROM
[dbo].[jiraissue]
AS [parent]
INNER JOIN
[dbo].[entity_property]
AS [e]
ON [e].[json_value] LIKE '%"parent_id":"' + CONVERT(VARCHAR(12),[parent].[Id]) + '"%'
AND[e].[PROPERTY_KEY] = 'jpo-issue-properties'
INNER JOIN
[dbo].[jiraissue]
AS [child]
ON [child].[ID] = [e].[ENTITY_ID]

Suggest an answer

Log in or Sign up to answer