How can I get the version ID from a web panel on the version page?

I’ve added a web panel with location atl.jira.releasereport.top.right.panels. This displays on a page about a specific version and I’d like to retrieve information about the version using the version ID.

I tried to use the context parameter, but when I specify the query parameter ?versionId=${version.id} in the URL for the web panel in the app descriptor, it’s not populated.

How can I access get the version ID from this location?

(Note, this was also asked in the general community)

2 Likes

Hi @MichaelBelton,
This looks like a bug so I’ve created https://jira.atlassian.com/browse/JRACLOUD-74513. Unfortunately, I don’t know of a workaround.
Regards,
Dugald

1 Like

Hi @dmorrow, thanks for the reply! :crossed_fingers: it will be resolved soon

No problems - good to see you’re watching the ticket. :slight_smile:

@dmorrow @MichaelBelton I have a workaround. Add the following javascript inside your iframe

	AP.getLocation(function(location){
		var versionId = location.match(/\/versions\/(.+?)\//)[1]
		console.log(versionId);
	});

Seems very dirty, but it’s better than nothing.

Hi @MartinCassidy very dirty :slight_smile: but it works! Thanks!

@dmorrow are there any plans for fixing that issue?

Best Valentin

Hi @ValentinPravtchev ,

Much of the development team’s effort is focussed on Forge so this issue is likely to remain outstanding for some time.

Regards,
Dugald

1 Like

Hi @dmorrow thanks for the quick response !

Good luck for the team!

Best Valentin