I am using Jira 3LO to access Jira API. I was able to create a project using the endpoint: rest/api/3/project/
I used the following properties:
const bodyData = {
assigneeType: 'UNASSIGNED', // other value is 'PROJECT_LEAD'
description: 'My Project 1',
issueSecurityScheme: 10001,
key: 'P1',
leadAccountId: leadAccountId,
name: 'Project 1',
notificationScheme: 10000,
permissionScheme: 0,
projectTemplateKey: 'com.pyxis.greenhopper.jira:gh-simplified-agility-kanban',
projectTypeKey: 'software',
url: 'http://atlassian.com',
};
My project was generated with the id 10003. When I call the issue type endpoint rest/api/3/issuetype, I get a list of issue types. It appears that most issues types have a scope and project id associated with them. These ids correlate to other projects that I created not via the api, but through the Jira application. One of those issue types has a scope id 10003 and a name of ‘Task’. When I try to create an issue with that issuetype’s id, the issue is created. When I try to create an issue with an issuetype that has the name ‘Story’ it fails. None of the Story issuetypes have my 10003 project id for the scope and none of them work when I try to create an issue. Here are the parameters I use to create my issue:
{
fields: {
issuetype: {
id: '10015', // The only one that would work
},
summary: activityName,
project: {
id: 10003,
},
assignee: {
id: assigneeId,
},
reporter: {
id: assigneeId,
}
},
};
Right now I am only able to create Tasks. How do I create a Story? Did I not set my project up correctly? Are there parameters that I am missing or are wrong?