Script Runner scripted field rendering

KnudK August 27, 2014

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

1 vote
Answer accepted
JamieA
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.
August 27, 2014

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.

0 votes
KnudK August 27, 2014

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

0 votes
KnudK August 27, 2014

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!

JamieA
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.
August 27, 2014

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.

Suggest an answer

Log in or Sign up to answer