Hello Atlassian Community,
I am currently trying to retrieve issues using this function
const fetchIssues = async (issueIdOrKey) => {
const response = await api.asUser().requestJira(route`/rest/api/3/issue/${issueIdOrKey}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
}
resolver.define('Get issues', async ({context}) => {
const issues = await fetchIssues();
console.log(issues);
});
However, when I call this function in my front end
useEffect(() => {
async function fetchIssues(){
const issues = await invoke('Get issues');
console.log(JSON.stringify(issues));
}
fetchIssues();
},[]);
I am getting the following error:
{
errorMessages: [ 'Issue does not exist or you do not have permission to see it.' ],
errors: {}
}
I have already specified the necessary permissions in my manifest file, but the error persists. Do any of you have any ideas on how to resolve this issue? Thank you in advance for your help.