Multiple Epic-Story-Link issuelinktype which stops queries working

We appear to have an issue in our JIRA system that stops some of the Grovey scripts working. We are using JIRA 5.2.7 and Greenhopper 6.2.2.2. When trying to use the

issueFunction in linkedIssuesOf("resolution = unresolved", "has Epic") I get an error
"More than one link type with description: has Epic". When I look at the issuelink table I see multiple entries for Epic-Story-Link which I guess are causing the error:
ID LINKNAME INWARD OUTWARD pstyle
10000 Dependency blocks depends on NULL
10001 Duplicate is duplicated by duplicates NULL
10010 jira_subtask_link jira_subtask_inward jira_subtask_outward jira_subtask
10020 Linked links to links to NULL
10030 Cloners Cloned from Cloned as NULL
10031 Replacement is replaced by replaces NULL
10040 Gantt Dependency has to be done after has to be done before Gantt
10050 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10051 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10052 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10053 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10054 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10055 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10056 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10057 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10058 Epic-Story Link has Epic is Epic of jira_gh_epic_story
10059 Epic-Story Link has Epic is Epic of jira_gh_epic_story
I tried figuring out which of the duplicates is used to delete the others, but when trying to check the issuelink for items that are linked (ie where we have used the epic link in JIRA to link stories to Epics), nothing comes back - select * from jira.dbo.issuelink where linktype > 10050
So firstly, anyone know how I can figure out which rows I can delete to have just one Epic-Story-Link and secondly wht is the schema that JIRA uses to link Epics and stories so that I can find the links already in use and see which ones they use?
Thanks

5 answers

1 accepted

These queries should expose the Epic linked issues, as well as the correct linktype to use:

SELECT * FROM issuelink WHERE linktype IN (SELECT id FROM issuelinktype WHERE linkname = 'Epic-Story Link')
SELECT * FROM propertynumber where ID = (select id from propertyentry where PROPERTY_KEY = 'GreenHopper.Epic.Default.linktype.id');

Once you've got that info, just make sure all of the issue links shown use the linktype described in the second query.

I've got the same issue. Trying to figure it out with Jamie, the author of ScriptRunner. You can follow here:

https://jira.tubemogul.info/secure/admin/groovy/GroovyRunner.jspa

did you manage to get anywhere with this? The link above is not open to the public.

Thanks

No, it turns out it is the same problem you have listed. Jamie suggested contacting JIRA support to figure out the issue. I'm working with out IT team to resolve it. Once done, I will post an update here.

Unfortunatly the link takes me to a secure JIRA area that I have no access to.

Do you have resolution?!

I was able to resolve this with the help of Atlassian support. Due to one of the upgrades, multiple issue links were created. A DB change had to be made to remove the duplicate links.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,319 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot