Skip to content

Failed to create issue - Field expects an Iterable value #298

@koyaniv

Description

@koyaniv

Hello,
I'm trying to create an issue via JiraClient

The issue is created via postMan - the json is:

{ "fields": { "project": { "id": "10019" }, "issuetype": { "id": "10004" }, "summary": "Automation - test3 (to delete)", "components": [ { "id": "10060", "name": "WebApp" } ], "description": { "version": 1, "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "test" } ] } ] }, "priority": { "id": "3", "name": "Medium", "iconUrl": "https://attentigroup.atlassian.net/images/icons/priorities/medium.svg" }, "versions": [ { "id": "10051" } ], "customfield_10097": { "id": "10176", "value": "Platform - General" }, "customfield_10088": { "id": "10159", "value": "Minor" } }, "update": {} }

=====================
With Java, i can't create an issue with the following steps:

`HashMap<String, String> myProduct = new HashMap();
myProduct.put("id","10176");
myProduct.put("value","Platform - General");

            HashMap<String, String> myPriority = new HashMap();
            myPriority.put("id","3");
            myPriority.put("name","Medium");
            myProduct.put("iconUrl", "https://attentigroup.atlassian.net/images/icons/priorities/medium.svg");

            HashMap<String, String> myPrior = new HashMap();
            myPrior.put("id","10159");
            myPrior.put("value","Minor");

            //Create issue if not exists
            fleuntCreate = Jira.createIssue(project, issueType)
                    .field(Field.SUMMARY, summary + " Yaniv test 2")
                    .field(Field.DESCRIPTION, description)
                    .field("versions", "10051")
                    .field("priority",  myPriority)
                    .field("customfield_10088",  myPrior)
                    .field("customfield_10097",  myProduct);
            Issue newIssue = fleuntCreate.execute();`

### ===== The Exception is: ##fleuntCreatenet.rcarz.jiraclient.Issue$FluentCreate@7fd0d64f
Field expects an Iterable value

As I see, the ### customfield_10097 - is not populated within the fleuntCreate object at all,
I tried everything. :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions