Hi,
I’m trying to update favicon with scriptrunner, what I’ve found is:
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.atlassian.jira.lookandfeel.LookAndFeelProperties
@WithPlugin(‘com.atlassian.jira.lookandfeel’)
@PluginModule
LookAndFeelProperties lookAndFeelProperties
def fav = “https://my.dev.instance.com/s/-119pdy/812001/7212861212121212160a14fdcb43997/_/images/fav-jcore.png”
try{
lookAndFeelProperties.setDefaultFavicon(fav, “30”, “30”)
}catch( e){
- log.error e *
}
this of course don’t work and there were no exceptions returned… but I have couple questions about this:
- class void setDefaultFavicon(String url, String width, String height); accepts only strings for width and height but what is the proper format “30”, “30” or maybe “30px”, “30px”.
- what is the good way to provide URL for file that I want to store on the server but without setting any HTTP service, just using jira.
2b)I have found that I can copy url of favicon element in Development mode in browsed, when I do that I get this weird address with my base url soem “hash” value and on the end reference to sub folder of atlassain-jira/ and than in my case /images/fav-jcore.png is actual server file… what more I can access this file from the browser without authentication.
maybe there is anther better approach?
there was void uploadDefaultFavicon(BufferedImage image); but now it is deprecated…
Best Regards,
Lukasz