Getting a scriptrunner fragment for a web panel in the right place

Fred W November 1, 2023

We have written some groovy script to get a list of project administrators for each project and it works and we can show it on the Project Summary Screen for all users of the project to see (either at the top or the bottom). But we would really like to position it under where the Project Lead, Key, Category information. Is this doable, do we have to look for a specific location ?

1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2023

I believe you are referring to the "Project Details" page that is accessible from the Project Settings (generally as the second choice below "Summary").

If so, I just checked, and that is not a page that registers a panel location that can be leveraged by scriptrunner (at least not in my environment).

Basically, if you don't see a location highlighted with the Fragment Locator, then you can't directly inject a panel there.

The best you can do is inject a panel that contains a hidden div and some javascript that will watch for the content of that details page to finish loading then inject that hidden div within the DOM of the details page.

I would suggest that perhaps you can add a panel directly in the Summary page instead. Try "location:webpanels.admin.summary.left-panels".

Or even directly in the sidebar ("location:jira.project.software.sidebar") and utilize an Inline dialog to display the table when users click a link in the sidebar.

Btw, I like the idea, I might borrow this for my environment. Usually, regular users never know who the admins of a project are and only other admins have the permissions to look that up.

Fred W November 2, 2023

Thank you for the answer. I was unaware of the Scriptrunner  Fragment Locator until yesterday afternoon when I had time to read through the documentation a bit better.

It is the panel with summary-page-vignette on the end.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.10.2
TAGS
AUG Leaders

Atlassian Community Events