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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

303 views 1 18
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