Getting and setting a field in Forge

Hi folks, I’m very much a newbie so I hope you’ll forgive a basic question.

I’ve completed the Forge Introduction tutorial (it was very good) and got everything working. But there is a bit of a gap between those and the suggested “next steps” pages.

At the moment, I just want to enhance the app I created in the tutorial to display the value of a field in the issue, and then let me update that field. Quite a simple idea, but I’m struggling to figure that out. I’m looking at the sample apps, some of which are quite sophisticated, but so far I haven’t cracked it.

Your assistance would be appreciated, whether with a code sample or pointing me in the right direction. Thanks!


I managed to read the field by hacking the code in the tutorial and some trial and error. I created this little function in the index.js:

const fetchStatusForIssue = async (issueId) => {
  const res = await api  
  const data = await res.json();
  return data;

And I called it like this:

 const [status] = useState(async () => await fetchStatusForIssue(context.platformContext.issueKey));
 console.log(`Status of this issue: ${}`);

My question now is whether there is a more elegant way to do this?

Hi @craig.schwarze,
I believe you were following the tutorial in here . You can get the data from issue fields by calling rest api and configuring correct scopes as mentioned in the above tutorial. JIRA rest api details are available in For Confluence it is

This should be the API calls you will have to use as if I understood your requirement correctly.

You can find more sample apps in here as well.

Thanks Lashani,

I tried to modify the example from the tutorial. For example, I tried to get the issue status with this function:

const fetchStatusForIssue = async (issueId) => {
  const res = await api

  const data = await res.json();
  return data;

What it is returning is:

[object Object],(payload) => {
                type: 'action',
                hookIndex: currentHookIndex,

Hi @craig.schwarze ,
Please try with the below sample


status is nested under issue fields.

1 Like