Hi!
I am currently working with a Forge custom field in Jira (jira:customField) and I’ve come across a challenge that I hope to get some help with.
Here’s the context: I have a Forge custom field (UI kit 1) that displays a link as a button. Code example:
const ButtonField = () => {
// Code to get priority
return (
<Text>
<Link href={`https://domain.com/?priority=${priority}`} appearance='button' openNewTab='_blank'>Click here</Link>
</Text>
);
};
This link carries certain parameters which are based on the values of other (custom) fields within the same issue. So, if the issue’s priority is changed, for instance, the link also gets updated accordingly.
However, in the current implementation, this update only happens when I refresh the issue page on my browser. I’d love to find a way to make this updating process more seamless.
I know events can be used, but how would I update the link as a whole from an event? Like issue update, check if the priority has changed and then update the link in real-time based on this event, thereby making the link dynamically responsive to changes in issue data. This way, the link would always reflect the most recent data, even without a page refresh.
Is there an existing method or best practice to achieve this within UI kit? Any guidance or examples would be greatly appreciated. Thanks in advance for your help!
Thanks in advance!
Rick