Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
koyaniv opened this issue Jan 17, 2023 · 0 comments
Open

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

koyaniv opened this issue Jan 17, 2023 · 0 comments

Comments

@koyaniv
Copy link

koyaniv commented Jan 17, 2023

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. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant