Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to update Forge UI Issue Panel with JIRA Issue update event listener function?

We have created an Issue panel on JIRA issue view screen. What we need to render is a list of issue keys (which fetched by an API call). 

This is how we define the Forge library manifest.yml file:

- key: dylan-hello-world-app-hello-world-panel
function: main
title: Forge App by Dylan
- key: issue-updated-trigger
- avi:jira:updated:issue
function: issue-trigger-func
- key: main
- key: issue-trigger-func
handler: index.issueUpdatedTrigger
id: our cloud app id
name: dylan-hello-world-app
- read:jira-work

 My run() function does the the rendering part of the panel (initial render).

The issueUpdateTrigger(event, context) function will be triggered when issue updated event happens. By default, this function will automatically received event and context parameters from JIRA.

In the issueUpdateTrigger, we would like to call API again by passing in context to retrieve new issue keys list and also update the context of our existing panel. May I know how can we perform the regarding actions?

(I think It is a must to expose both run() and issueUpdatedTrigger() functions in the index file, cause this is how Forge reads the function, and therefore these two functions might not be able to share a common ancestor function.)

Appreciate your help and do let me know if more information is needed :D

2 answers

1 accepted

0 votes
Answer accepted
Mateusz S Atlassian Team Apr 06, 2021

Hi @Dylan Oh,

I've checked with the team and updating the app's view basing on the trigger state (or updating the trigger basing on the view code) is not possible.



I see, thanks for helping to reach out, Mateusz.

May we check in this case, is there any function that we can use to force refresh the issue panel inside our event listening function?

Mateusz S Atlassian Team Apr 07, 2021

Unfortunately refreshing the issue panel is not possible inside event listening function. You may provide a button for users to refresh an issue using e.g. useAction - when state of the hook is refreshed, the view is re-rendered. 


Dylan Oh

Hi Mateusz,

I see... thanks for explaining.

We are doing something like an issue panel to display information regarding the ticket, ,and therefore we would require the issue panel to listen for the event of issue updating and not the event that is happening within the app itself (like button onClick).

Can I also check with you is the function below catching JIRA Issue updating event? Because we have tested this for our app but it is not catching event from JIRA when we update the issue.'customPublicEvent', function(){
alert('public event fired');

 Again, appreciate your input!

Mateusz S Atlassian Team Apr 09, 2021

@Dylan Oh

unfortunately currently it's not possible using UI kit. But with CustomUI you can build your own UI with JS and use e.g. some interval polling / checking if the state changed. 

Regarding the code chunk you've pasted - the AP is suggesting you're using the Connect JS API - It doesn't work on Forge.



0 votes
Mateusz S Atlassian Team Apr 01, 2021

Hi @Dylan Oh


I'll gather information and we'll come back to you with an answer :) 




So this comment was an april fools then?

apologies. my mistake. ordered latest first. 

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

106 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you