Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,261
Community Members
 
Community Events
168
Community Groups

Get error on create issue from rest api for type Bug

I was getting error on Create issue error msg from Jira is as below

{
    "errorMessages": [
        "JD user picker: JD user picker is required.",
        "JD issue date: JD issue date is required.",
        "JD version picker multiple: JD version picker multiple is required.",
        "JD issue URL: JD issue URL is required.",
        "JD Issue multiple list: JD Issue multiple list is required.",
        "JD Issue single list: JD Issue single list is required.",
        "JD Group Picker single: JD Group Picker single is required.",
        "JD Group picker: JD Group picker is required.",
        "JD issue detailed description: JD issue detailed description is required.",
        "JD issuing team: JD issuing team is required.",
        "JD issue time: JD issue time is required.",
        "JD issue type: JD issue type is required.",
        "JD issue single line description: JD issue single line description is required.",
        "JD version picker single: JD version picker single is required."
    ],
    "errors": {}
}

but when we do get call for get fields for issuetype bug will not get such fields is response as mention in above error

{
    "expand": "projects",
    "projects": [
        {
            "expand": "issuetypes",
            "self": "https://mydomain.atlassian.net/rest/api/2/project/10114",
            "id": "10114",
            "key": "JTD",
            "name": "Jira-Test-Development",
            "avatarUrls": {
                "48x48": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490",
                "24x24": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490?size=small",
                "16x16": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490?size=xsmall",
                "32x32": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490?size=medium"
            },
            "issuetypes": [
                {
                    "self": "https://mydomain.atlassian.net/rest/api/2/issuetype/10004",
                    "id": "10004",
                    "description": "A problem which impairs or prevents the functions of the product.",
                    "iconUrl": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium",
                    "name": "Bug",
                    "untranslatedName": "Bug",
                    "subtask": false,
                    "expand": "fields",
                    "fields": {
                        "summary": {
                            "required": true,
                            "schema": {
                                "type": "string",
                                "system": "summary"
                            },
                            "name": "Summary",
                            "key": "summary",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ]
                        },
                        "parent": {
                            "required": false,
                            "schema": {
                                "type": "issuelink",
                                "system": "parent"
                            },
                            "name": "Parent",
                            "key": "parent",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ]
                        },
                        "issuetype": {
                            "required": true,
                            "schema": {
                                "type": "issuetype",
                                "system": "issuetype"
                            },
                            "name": "Issue Type",
                            "key": "issuetype",
                            "hasDefaultValue": false,
                            "operations": [],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/issuetype/10004",
                                    "id": "10004",
                                    "description": "A problem which impairs or prevents the functions of the product.",
                                    "iconUrl": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium",
                                    "name": "Bug",
                                    "subtask": false,
                                    "avatarId": 10303,
                                    "hierarchyLevel": 0
                                }
                            ]
                        },
                        "components": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "component",
                                "system": "components"
                            },
                            "name": "Components",
                            "key": "components",
                            "hasDefaultValue": false,
                            "operations": [
                                "add",
                                "set",
                                "remove"
                            ],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/component/10069",
                                    "id": "10069",
                                    "name": "JD component 2"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/component/10068",
                                    "id": "10068",
                                    "name": "JD sample components"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/component/10070",
                                    "id": "10070",
                                    "name": "test"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/component/10071",
                                    "id": "10071",
                                    "name": "uhuh"
                                }
                            ]
                        },
                        "project": {
                            "required": true,
                            "schema": {
                                "type": "project",
                                "system": "project"
                            },
                            "name": "Project",
                            "key": "project",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/project/10114",
                                    "id": "10114",
                                    "key": "JTD",
                                    "name": "Jira-Test-Development",
                                    "projectTypeKey": "software",
                                    "simplified": false,
                                    "avatarUrls": {
                                        "48x48": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490",
                                        "24x24": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490?size=small",
                                        "16x16": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490?size=xsmall",
                                        "32x32": "https://mydomain.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10490?size=medium"
                                    },
                                    "projectCategory": {
                                        "self": "https://mydomain.atlassian.net/rest/api/2/projectCategory/10000",
                                        "id": "10000",
                                        "description": "All projects in the Product department",
                                        "name": "Product"
                                    }
                                }
                            ]
                        },
                        "description": {
                            "required": false,
                            "schema": {
                                "type": "string",
                                "system": "description"
                            },
                            "name": "Description",
                            "key": "description",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ]
                        },
                        "customfield_10010": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "json",
                                "custom": "com.pyxis.greenhopper.jira:gh-sprint",
                                "customId": 10010
                            },
                            "name": "Sprint",
                            "key": "customfield_10010",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ]
                        },
                        "reporter": {
                            "required": true,
                            "schema": {
                                "type": "user",
                                "system": "reporter"
                            },
                            "name": "Reporter",
                            "key": "reporter",
                            "autoCompleteUrl": "https://mydomain.atlassian.net/rest/api/2/user/search?query=",
                            "hasDefaultValue": true,
                            "operations": [
                                "set"
                            ]
                        },
                        "fixVersions": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "version",
                                "system": "fixVersions"
                            },
                            "name": "Fix versions",
                            "key": "fixVersions",
                            "hasDefaultValue": false,
                            "operations": [
                                "set",
                                "add",
                                "remove"
                            ],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/version/10010",
                                    "id": "10010",
                                    "name": "JD version",
                                    "archived": false,
                                    "released": false,
                                    "projectId": 10114
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/version/10011",
                                    "id": "10011",
                                    "name": "JD version 2",
                                    "archived": false,
                                    "released": false,
                                    "projectId": 10114
                                }
                            ]
                        },
                        "priority": {
                            "required": true,
                            "schema": {
                                "type": "priority",
                                "system": "priority"
                            },
                            "name": "Priority",
                            "key": "priority",
                            "hasDefaultValue": true,
                            "operations": [
                                "set"
                            ],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/priority/2",
                                    "iconUrl": "https://mydomain.atlassian.net/images/icons/priorities/high.svg",
                                    "name": "High",
                                    "id": "2"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/priority/3",
                                    "iconUrl": "https://mydomain.atlassian.net/images/icons/priorities/medium.svg",
                                    "name": "Medium",
                                    "id": "3"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/priority/4",
                                    "iconUrl": "https://mydomain.atlassian.net/images/icons/priorities/low.svg",
                                    "name": "Low",
                                    "id": "4"
                                }
                            ],
                            "defaultValue": {
                                "self": "https://mydomain.atlassian.net/rest/api/2/priority/3",
                                "iconUrl": "https://mydomain.atlassian.net/images/icons/priorities/medium.svg",
                                "name": "Medium",
                                "id": "3"
                            }
                        },
                        "customfield_10178": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "option",
                                "custom": "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes",
                                "customId": 10178
                            },
                            "name": "impediment_2",
                            "key": "customfield_10178",
                            "hasDefaultValue": false,
                            "operations": [
                                "add",
                                "set",
                                "remove"
                            ],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10083",
                                    "value": "true",
                                    "id": "10083"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10084",
                                    "value": "false",
                                    "id": "10084"
                                }
                            ]
                        },
                        "customfield_10256": {
                            "required": false,
                            "schema": {
                                "type": "option",
                                "custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
                                "customId": 10256
                            },
                            "name": "Company Name",
                            "key": "customfield_10256",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10241",
                                    "value": "2degrees",
                                    "id": "10241"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10242",
                                    "value": "Abbott Laboratories",
                                    "id": "10242"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10243",
                                    "value": "Admiral Group",
                                    "id": "10243"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10244",
                                    "value": "Allegion plc",
                                    "id": "10244"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10245",
                                    "value": "Ally Financial",
                                    "id": "10245"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10246",
                                    "value": "BC Government - Natural Resource Ministries",
                                    "id": "10246"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10247",
                                    "value": "BHP",
                                    "id": "10247"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10248",
                                    "value": "Blackrock",
                                    "id": "10248"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10249",
                                    "value": "BNY Mellon",
                                    "id": "10249"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10250",
                                    "value": "Carrier",
                                    "id": "10250"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10251",
                                    "value": "Charles Schwab & Co., Inc.",
                                    "id": "10251"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10252",
                                    "value": "Clarivate Technologies",
                                    "id": "10252"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10253",
                                    "value": "Cognizant",
                                    "id": "10253"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10254",
                                    "value": "Cvent",
                                    "id": "10254"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10255",
                                    "value": "CVS Health",
                                    "id": "10255"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10256",
                                    "value": "cxLoyalty div of JPMC",
                                    "id": "10256"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10257",
                                    "value": "Disney",
                                    "id": "10257"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10258",
                                    "value": "DTCC",
                                    "id": "10258"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10259",
                                    "value": "Eaton",
                                    "id": "10259"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10260",
                                    "value": "Estee Lauder",
                                    "id": "10260"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10261",
                                    "value": "Finastra",
                                    "id": "10261"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10262",
                                    "value": "Ford Motor Company",
                                    "id": "10262"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10263",
                                    "value": "Freddie Mac",
                                    "id": "10263"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10264",
                                    "value": "General Atomics",
                                    "id": "10264"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10265",
                                    "value": "HCA Holdings, Inc.",
                                    "id": "10265"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10266",
                                    "value": "Highmark",
                                    "id": "10266"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10267",
                                    "value": "Humana",
                                    "id": "10267"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10268",
                                    "value": "Intuit",
                                    "id": "10268"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10269",
                                    "value": "Kaiser Permanente",
                                    "id": "10269"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10270",
                                    "value": "Las Vegas Sands",
                                    "id": "10270"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10271",
                                    "value": "Lenovo",
                                    "id": "10271"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10272",
                                    "value": "Liberty Mutual Insurance Company HQ",
                                    "id": "10272"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10273",
                                    "value": "Marriott",
                                    "id": "10273"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10274",
                                    "value": "Marsh & Mclennan Companies",
                                    "id": "10274"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10275",
                                    "value": "McKesson Corporation",
                                    "id": "10275"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10276",
                                    "value": "Medtronic",
                                    "id": "10276"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10277",
                                    "value": "Mercedes Benz Financial",
                                    "id": "10277"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10278",
                                    "value": "Molina Healthcare, Inc.",
                                    "id": "10278"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10279",
                                    "value": "Omnicell, Inc,",
                                    "id": "10279"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10280",
                                    "value": "PNC",
                                    "id": "10280"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10281",
                                    "value": "PT Bank Danamon Indonesia",
                                    "id": "10281"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10282",
                                    "value": "Smith & Nephew",
                                    "id": "10282"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10283",
                                    "value": "SONY Corporation of America",
                                    "id": "10283"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10284",
                                    "value": "Starbucks",
                                    "id": "10284"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10285",
                                    "value": "TAL",
                                    "id": "10285"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10286",
                                    "value": "Telecom Technology Center - TTC",
                                    "id": "10286"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10287",
                                    "value": "Telefonica",
                                    "id": "10287"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10288",
                                    "value": "Telus",
                                    "id": "10288"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10289",
                                    "value": "Test Account",
                                    "id": "10289"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10290",
                                    "value": "The TJX Companies",
                                    "id": "10290"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10291",
                                    "value": "Tik Tok",
                                    "id": "10291"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10292",
                                    "value": "University of Melbourne",
                                    "id": "10292"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10293",
                                    "value": "Zebra Technologies Corporation",
                                    "id": "10293"
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/customFieldOption/10294",
                                    "value": "ZOLL Medical Corporation",
                                    "id": "10294"
                                }
                            ]
                        },
                        "labels": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "string",
                                "system": "labels"
                            },
                            "name": "Labels",
                            "key": "labels",
                            "autoCompleteUrl": "https://mydomain.atlassian.net/rest/api/1.0/labels/suggest?query=",
                            "hasDefaultValue": false,
                            "operations": [
                                "add",
                                "set",
                                "remove"
                            ]
                        },
                        "environment": {
                            "required": false,
                            "schema": {
                                "type": "string",
                                "system": "environment"
                            },
                            "name": "Environment",
                            "key": "environment",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ]
                        },
                        "customfield_10008": {
                            "required": false,
                            "schema": {
                                "type": "any",
                                "custom": "com.pyxis.greenhopper.jira:gh-epic-link",
                                "customId": 10008
                            },
                            "name": "Epic Link",
                            "key": "customfield_10008",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ]
                        },
                        "attachment": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "attachment",
                                "system": "attachment"
                            },
                            "name": "Attachment",
                            "key": "attachment",
                            "hasDefaultValue": false,
                            "operations": [
                                "set"
                            ]
                        },
                        "versions": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "version",
                                "system": "versions"
                            },
                            "name": "Affects versions",
                            "key": "versions",
                            "hasDefaultValue": false,
                            "operations": [
                                "set",
                                "add",
                                "remove"
                            ],
                            "allowedValues": [
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/version/10010",
                                    "id": "10010",
                                    "name": "JD version",
                                    "archived": false,
                                    "released": false,
                                    "projectId": 10114
                                },
                                {
                                    "self": "https://mydomain.atlassian.net/rest/api/2/version/10011",
                                    "id": "10011",
                                    "name": "JD version 2",
                                    "archived": false,
                                    "released": false,
                                    "projectId": 10114
                                }
                            ]
                        },
                        "issuelinks": {
                            "required": false,
                            "schema": {
                                "type": "array",
                                "items": "issuelinks",
                                "system": "issuelinks"
                            },
                            "name": "Linked Issues",
                            "key": "issuelinks",
                            "autoCompleteUrl": "https://mydomain.atlassian.net/rest/api/2/issue/picker?currentProjectId=&showSubTaskParent=true&showSubTasks=true&currentIssueKey=null&query=",
                            "hasDefaultValue": false,
                            "operations": [
                                "add"
                            ]
                        },
                        "assignee": {
                            "required": false,
                            "schema": {
                                "type": "user",
                                "system": "assignee"
                            },
                            "name": "Assignee",
                            "key": "assignee",
                            "autoCompleteUrl": "https://mydomain.atlassian.net/rest/api/2/user/assignable/search?project=JTD&query=",
                            "hasDefaultValue": true,
                            "operations": [
                                "set"
                            ]
                        }
                    }
                }
            ]
        }
    ]
}

 what is the solution for this?

1 answer

1 accepted

1 vote
Answer accepted

Welcome to the Atlassian Community!

Try a simple test - log in as the user you are using for the REST call, and try creating the issue in the UI.

I think you'll find all those fields are missing from the create issue screen, and if you try to create an issue, it will fail with a load of "mandatory field missing" errors, the same as your REST call.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Atlassian Community Events