Script Runner scripted field rendering

I have a scripted field that can be heavy to load. Is it possible programmatically to detect if rendering is for a single view, a column view or for xml? If so, from where do i get the context?

3 answers

1 accepted

As far as I know, no. Not short of examining the current stack which you don't want to do. The idea smells a bit fishy anyway, sounds like you will be too tightly coupled.

I would focus on speeding up the scripted field, or using a read-only custom field that is updated through a listener.

The scripted field calls a web service and Jira is not aware of external events that might change outcome. Rendering will be made role/group and status dependent bringing down load. And we'll see if web service can be optimized.

Thanks for the quick reply!

Yeah, tricky one. Maybe a custom field that has a template that uses js to lazily get the value from the web service. Depends if you want to index the returned value or not... also you could do caching on the web service side, but there will still be a lot of requests if you do a full reindex for instance.

Thank you for valid input. I do not index the returned value as I have the basic information ("commit id's") in another Jira field, the web service returns valuable details in html from our non-Atlassian-supported RCS that some users needs for processing while issues are in certain states. I will plan a load test to see how serious the problems is, then we will act from there

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,725 views 17 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you