"Epic with name 'xxxx' is not unique" error when trying to add an issue to an epic
症状
When a user tries to add an issue to an epic using the new Epic Link field, the following error message appears in the issue screen:
Epic with name 'epic-name-here' is not unique.
診断
So far, this problem has only been detected to occur in JIRA Agile 6.2.2 or in later versions when using the SOAP UpdateIssue method. This is essentially caused by the issue key being a substring of another issue. For example ABC-12 is a substring of ABC-123.
As we can see from the Screenshot above, JIRA Agile seems to have truncated the Epic Name, and only used the prefix of the epic name for validation when searching for the epic. For example, lets say we have two epics with name "ABC-123 Testing Epic" and "ABC-12 Another Test". When we try to add an issue to the epic "ABC-123 Testing Epic", JIRA would only take the prefix of the epic name, in this case "ABC-123", and show the error "Epic with name 'ABC-123' is not unique.".
原因
This is a known bug in JIRA Agile as tracked under JSWSERVER-10140 - Epic with name is not unique error displayed.
回避策
If you encounter this error, you may be able to run the following SQL Query and check for duplicate IDs or pkey values on each of the Epic issues returned in this query.
SELECT * FROM jiraissue WHERE issuetype = (SELECT ID FROM issuetype WHERE pname = 'Epic');
Resolution
Upgrading past JIRA Agile 6.2.2 may fix the error in the browser. When JSWSERVER-10140 - Epic with name is not unique error displayed is resolved the problem will be fixed.