You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi,
I am trying to create an issue from
AsynchronousJiraRestClientFactory
This is my code
AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
JiraRestClient restClient = factory.create(jiraServerUri, auth);
IssueRestClient issueClient = restClient.getIssueClient();
IssueInputBuilder iib = new IssueInputBuilder();
iib.setProjectKey("PROD");
iib.setReporterName("xxxx");
iib.setSummary("test");
iib.setDescription("test describtion");
iib.setPriorityId(3L);
iib.setAssigneeName("xxx");
iib.setIssueTypeId(TASK);
IssueInput issue = iib.build();
BasicIssue issueObj = issueClient.createIssue(issue).claim();
issueId = issueObj.getKey();
Error:
RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={assignee=Issues must be assigned.}, errorMessages=[]}]}
Note: The assignee have permission to create an issue
this issue occurs recently (last 3 months). Before with the same set of code, created the issue.
@BHUVANESWARI The problem here is Jira Cloud has stopped taking 'name' as input for user related field in API (due to GDPR) and the library you are using 'jira-rest-java-client' is not updated to handle this.
You will need to wait for this changes to appear in library.
Quick Note - This library as per documentation is meant to be used with Jira Server. I suggest you call rest API directly using client like unirest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That’s odd.
What value are you parsing in your assignee entry?
Can you make sure it is the user key(lower user name) that you parsed?
Also, you can consider making the assignee field optional in your field configuration and see if the error is thrown. If it isn’t then use actual user keys.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ismael Jimoh How do i make assignee field optional as field configuration doesn't have an option to make the assignee field optional.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.