TC-Fan
October 3, 2022, 4:00am
1
I am trying to create issue with using the IssueService.newIssueInputParameters(Map<String, String > actionPararmer)
https://docs.atlassian.com/software/jira/docs/api/9.3.0/
is there a list of the parameter names that can be set during issue creation and during issue update?
Hi Tim ,
Please let me know if this works
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters();
issueInputParameters.setProjectId(projectId).setIssueTypeId(“1”)
.setSummary("issue summary")
.setReporterId("reporterId")
.setAssigneeId("assigneeId")
.setDescription("issue description")
.setStatusId("1").setPriorityId("2");
CreateValidationResult createValidationResult = issueService.validateCreate(user, issueInputParameters);
MutableIssue issue=null;
IssueResult createResult = issueService.create(user, createValidationResult);
if (createResult.isValid()) {
issue = createResult.getIssue();
}
FYI , I have not tested this
TC-Fan
October 3, 2022, 12:58pm
3
Yes. this works. However, I like to use the IssueService.newIssueInputParameters(Map<String, String> actionPararmer) API to where I can load the Map<String, String[]> from a file or such.
Please try with below keys
projectid
summary
assignee
reporter
description
TC-Fan
October 6, 2022, 12:03pm
5
the projectid is pid. I’m just curious if there is documentation what the keys (or names) are acceptable.