It appears that somehow, JIRA/JIRA Agile is able to get into such a state that the Epic-Story Link is duplicated in the issuelinktype table of JIRA database.
The following SQL query returns more than one row from database:
- JQL queries using linktype will break (See: https://confluence.atlassian.com/display/AGILEKB/Duplicate+Epic-Story+Link+types+in+IssueLinkType+table+causing+errors+in+search+using+has+Epic)
- JIRA and JIRA Agile are unable to retrieve Epic Link data or Epic associations i.e. all issues or stories would appear missing from their epics (See: https://confluence.atlassian.com/display/AGILEKB/All+Epic+Link+data+appears+lost+after+upgrade).
- JIRA/JIRA Agile should be able to prevent or detect and delete this duplicate linktype entries.
Not quite sure if this should be a JIRA or JIRA Agile issue, but I'd leave developers to decide and move this if necessary. It occurred in a JIRA 6.1.4 instance.
Please find workarounds to fix the broken data in the KB article links provided under the Symptoms section above