How do i access properties of issue using the issue context variable?

I am trying to print properties of issue using “issue” context variable in Forge. But i am getting undefined response for everything excluding key and id. Can anyone help me with the code?

export const validate = args => {

const issueKey = args.issue.key;

console.log(args.issue.summary)
console.log(args.issue.assignee)
return {
result: issueKey.startsWith(‘PRO’),
errorMessage: ‘Only PRO project can use this flow’
};
}

this is the code i have used.

Hey, I don’t think you can access the properties of an issue using the context. You will have to use API endpoint for that, https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-properties/#api-group-issue-properties

1 Like

Hi,
Thank you so much for your response. Actually what i am trying to achieve is “capturing values input by user on the transition screen”. I am under the impression that properties can do that. I tried the api as suggested by you but i am getting an empty dictionary as { keys: }

export const run = async ({ issue, transition: { from, to } }) => {
const response= await api.asApp().requestJira(route/rest/api/3/issue/${issue.key}/properties);
const data= await response.json();
console.log(data)

Is there a way to capture data on transition screen using api?