Epic Link value from the REST API doesn't match the one in the issue

Recently we found an issue on our test cloud instance, that behaves weird.

Issue with no Epic Link

The issue doesn’t have Epic Link in the Issue View:

image

Epic link ID from the https://epictest.atlassian.net/rest/api/2/field is:

{
    "id": "customfield_10008",
    "key": "customfield_10008",
    "name": "Epic Link",
    "custom": true,
    "orderable": true,
    "navigable": true,
    "searchable": true,
    "clauseNames": [
        "cf[10008]",
        "Epic Link"
        ],
    "schema": {
        "type": "any",
        "custom": "com.pyxis.greenhopper.jira:gh-epic-link",
        "customId": 10008
    }
}

REST API call https://epictest.atlassian.net/rest/api/2/issue/TEST-16?fields=customfield_10008 results with:

{
    "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
    "id": "10149",
    "self": "https://epictest.atlassian.net/rest/api/2/issue/10149",
    "key": "TEST-16",
    "fields": {
        "customfield_10008": "TEST-6"
    }
}

Agile REST API call results https://epictest.atlassian.net/rest/agile/1.0/issue/TEST-16?fields=customfield_10008,epic with:

{
    "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
    "id": "10149",
    "self": "https://epictest.atlassian.net/rest/agile/1.0/issue/10149",
    "key": "TEST-16",
    "fields": {
        "epic": null,
        "customfield_10008": "TEST-6"
    }
}

Same issue, Epic link added

image

If we add Epic Link to the issue, the results from the API calls are different:

REST API (https://epictest.atlassian.net/rest/api/2/issue/TEST-16?fields=customfield_10008) returns

{
    "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
    "id": "10149",
    "self": "https://epictest.atlassian.net/rest/api/2/issue/10149",
    "key": "TEST-16",
    "fields": {
        "customfield_10008": "TEST-6"
    }
}

Agile REST API (https://epictest.atlassian.net/rest/agile/1.0/issue/TEST-16?fields=customfield_10008,epic) returns

{
    "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
    "id": "10149",
    "self": "https://epictest.atlassian.net/rest/agile/1.0/issue/10149",
    "key": "TEST-16",
    "fields": {
        "epic": {
            "id": 10199,
            "key": "HT-36",
            "self": "https://epictest.atlassian.net/rest/agile/1.0/epic/10199",
            "name": "Epic",
            "summary": "Epic",
            "color": {
                "key": "color_3"
            },
            "done": false
        },
        "customfield_10008": "TEST-6"
    }
}

There’s obvious difference for the fields array. Results of the REST API are not correct. And this is also affect JQL:
“Epic Link” in (TEST-6) doesn’t return TEST-16 though it should.

And the real weird thing here is following: this difference appears on this specific issue only. If we create new Bug and link it to the new Epic, everything is ok.

Unfortunately, we can’t use Agile REST API since it works per on single issue only. But JQL support is core part of the add-on we develop. Several clients of ours have the problem with issue, so it would be great to see it fixed.

1 Like

This looks like a Jira Cloud bug in our APIs. I think it would be best to raise that as an issue here: Jira Service Management

1 Like

Hi @dmitry.astapkovich,

Please see this: Log in with Atlassian account for reference.

Cheers,
Anne Calantog

1 Like

Got the ticket it, thank you!

With the help of @acalantog the bug was confirmed, so now it’s official: [JSWCLOUD-16783] Adding an Epic ID via Edit Screen's Issue Link field results in epic link custom field population - Create and track feature requests for Atlassian products.

Thanks a lot for the cooperation!

2 Likes

Thanks for updating @dmitry.astapkovich :slight_smile: