Can we create epic and its linked user story through single json ?

Vishal Sitpura
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 25, 2023
I am using this json to create and epic and user story in one transaction. however, it giving me the exception.
{
    "fields": {
        "project": {
            "key""AU"
        },
        "issuetype": {"name""Epic"},
        "customfield_10011""Epic 1",
        "summary""Epic 1",
        "duedate""2023-01-18T00:00:00",
        "reporter": {
            "accountId""abc"
        },
        "priority": {
            "id""3"
        }
    },
    "fields": {
        "project": {
            "key""AU"
        },
        "issuetype": {"name""Story"},
        "summary""User Story 1",
        "duedate""2023-01-18T00:00:00",
        "reporter": {
            "accountId""abc"
        },
        "priority": {
            "id""3"
        },
        "customfield_10014" : "Epic 1"  -- This field is for epic link
    }
}

2 answers

0 votes
Bill Sheboy
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.
October 25, 2023

Hi @Vishal Sitpura -- Welcome to the Atlassian Community!

I suspect the answer is, "no".

The Story create would need the issue key from the created Epic, and the Epic has not been created at the time you submit the JSON.  And without knowing the internals of how Jira is processing the JSON we may not be able to assume this is iterating and processing those nodes in the order you show them.

Kind regards,
Bill

Vishal Sitpura
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 2, 2023

@Bill Sheboy Is there a way we can create issue key by our own and not auto generating from Jira ?

Bill Sheboy
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.
November 2, 2023

Not that I am aware of: the key is generated when the issue is created.

0 votes
Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2023

Hi @Vishal Sitpura welcome to the community.  What is the exception?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events