Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create a jira issue in which I want to link to another issue using link type 'Child'

sarath kumar June 16, 2023

Using JIRA REST API I am unable to create a Jira issue in which I want to link to another issue using link type 'Child' however I am able to create it with other issue link types like 'Tests', 'Related', 'Parent' etc. But all issue link types are available in the application and I am able to create issue with all link types in UI. Kindly help.

API: https://<jiraservername>/rest/api/2/issue

Payload:

{
    "fields": {
        "summary""Manual Test with Steps and custom fields created using API",
        "project": {
            "key""TTP"
        },
        "description""First Manual Test with Steps and custom fields created using API",
        "issuetype": {
            "name""Test"
        },
        "labels": [
            "Label1",
            "Label2",
            "Label3"
        ]
    },
    "update": {
        "issuelinks": [
            {
                "add": {
                    "type": {
                        "name""child"
                    },
                    "outwardIssue": {
                        "key""TTP-15757"
                    }
                }
            }
        ]
    }
}

Error: 

{
    "errorMessages": [
        "No issue link type with name 'child' found."
    ],
    "errors": {}
}

1 answer

1 accepted

0 votes
Answer accepted
Alisa Zamaraeva
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.
June 16, 2023

Hi @sarath kumar 

Try changing outwardIssue to inwardIssue so it could be like this: 

"add": {
                    "type": {
                        "name""child"
                    },
                    "inwardIssue": {
                        "key""TTP-15757"
                    }
}

Issue link types can have different descriptions for inward and outward issues, you can check yours in Settings > Issues > Issue linking. 

sarath kumar June 16, 2023

Thank you @Alisa Zamaraeva for taking the time to help me.

Description in Settings> Issues > Issue Linking.

image.png


Also, I have tried with inwardIssue but no luck. Please help.

Alisa Zamaraeva
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.
June 16, 2023

Hi again @sarath kumar 

From what I see on the screenshot, my next guess is that when you create issue link with api you choose link type by name (first column), not outward/inward description. And based on the screenshot you posted, there are no Child issue link type. 

As I understand, when you try this code with Parent link type it makes 1st issue a parent and 2nd a child, but you want it vice versa.

Try this, it should make things right. 

"add": {
                    "type": {
                        "name""Parent"
                    },
                    "inwardIssue": {
                        "key""TTP-15757"
                    }
}
sarath kumar June 20, 2023

Thanks a lot :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, dance, gamification, badge, razzle dazzle, team '25 anaheim

Earn a one-day badge today and do the Atlazzle Dazzle! 🕺

Today only! Share what you’re the most excited about for Team ‘25 or just dance out the beginning of a new quarter with us.

Comment the post
AUG Leaders

Atlassian Community Events