Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to display icon/image/avatar on Custom web item in ScriptRunner Fragments?

JK
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2023

In Jira, after much research, I was able to add custom dropdown web item on the top navigation bar using ScriptRunner Fragments. 

Now my question: is it possible to add icon/image/avatar on the left side of the dropdown options? The dropdown options are customer service portal URLs. 

Thank you

 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
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.
June 1, 2023

Not directly out of the box.

You would need to use a separate fragment to inject some javascript (either web resource or web panel) that will modify the DOM.

It can be tricky to have the script injected at the correct time (the custom web item has to be there before the script can act on it). Unless you use some fancy js to wait for the element to appear.

JK
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 2, 2023

Thanks for the reply. 

I did find the Web Item Provider use case, It took me a while to get the list and map to work, but I was able to create options dynamically with icons and urls.

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.
June 2, 2023

I had not reviewed the web item provider functionality in a long time and never used it.

But now, reviewing the documentation page, I can see that it will work better than my suggestion.

TAGS
AUG Leaders

Atlassian Community Events