set epic when creating an issue

I'm creating a new issue ala


and in createmeta

/rest/api/2/issue/createmeta?projectKeys=<project id>&issuetypeName=Bug&expand=projects.issuetypes.fields

I see customfield_10007 defined like this

"customfield_10007": {
"hasDefaultValue": false,
"name": "Epic Link",
"operations": [
"required": false,
"schema": {
"custom": "com.pyxis.greenhopper.jira:gh-epic-link",
"customId": 10007,
"items": "string",
"type": "array"


I look in 


to find the <epicid> then look in 


to confirm the <epicid> and the <epickey>.

I try setting that field to <epickey> when creating a new issue, but when I go look at the issue in the web interface, the 'Epic Link' is blank.  

If I try setting that field to <epicid>, I get this error

Epic with key <epicid> does not exist.



2 answers

This widget could not be displayed.
Boris Berenberg Community Champion Sep 11, 2015

The id you are providing is that of the board, not the epic. Try and access the Epic via the rest API, and look at the ID value you get. Then try and use that id in your issue creation request.

When I look up the Epic via /rest/agile/1.0/board/<boardid>/epic to get the epic id, then /rest/agile/1.0/epic/<epicid> to confirm, and then use that id in the create issue, I get the error Epic with key <epicid> does not exist. (I've updated my question with this info to make it more clear) Sounds like I can't do this currently: but I can do it with a separate call:

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

246 views 1 3
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