Hey I want to create an epic on jira via a Confluence contentAction plugin on confluence.
I have provided the below permissions:
permissions:
scopes:
- 'read:confluence-content.summary'
- 'read:confluence-content.all'
- 'read:page:confluence'
- 'read:jira-work'
- 'write:jira-work'
- 'write:issue:jira'
- 'read:connect-jira'
- 'write:connect-jira'
resolver.define("createTickets", async (req) => {
console.log("Append req");
console.log(req);
try {
const response = await api.asUser().requestJira(route`/rest/api/2/issue/`, {
method: "POST",
headers: {
"X-Atlassian-Token": "nocheck",
"Content-Type": "application/json",
Accept: "application/json",
},
body: JSON.stringify(req.payload.payload),
});
console.log(response);
return await response.json();
} catch (err) {
console.log(err);
return err;
}
});
this is my resolver that i have created for creating an issue type of Epic and the payload for this req is:
const payload = {
fields: {
project: {
key: "TEST",
},
issuetype: { name: "Epic", id: "10004" },
description: epicInfo.description,
summary: "Test",
customfield_10011: "title",
},
I have verified that the app is installed on both confluence and jira. I am also using
/rest/api/2/issue/createmeta and /rest/api/2/project as well which seem to work without any issue.
Any help would be appreaciated.