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

1 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

140 views 0 3
Join discussion

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