Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom picker using REST API as source - performance and caching

Roman Holdener
Contributor
October 10, 2023 edited

Hi

Is there anyone with experience in using Scriptrunner to write a custom picker scripted field?

I have to following use case: I will attempt to use the REST API from SAP4/HANA to retrieve WBS Elements as documented here:
https://api.sap.com/api/OP_API_PROJECT_V3_0001/path/get_WBSElement
We use those elements to store project numbers. We will use them in Jira Stories to determine, which stories belongs to which project number in SAP.

I found a documentation from adaptavist about how to set up a custom picker field using REST API:
https://docs.adaptavist.com/sr4js/8.11.0/features/script-fields/built-in-script-fields/custom-picker?utm_source=product-help

Now my question: According to the documentation, "Retrieving information from REST resources can be expensive. Each time the issue is viewed, the code making the REST request is called in order to get the item; hence it is advisable to cache responses." 

- therefore, it is advisable to use caching. The documentaion of Adaptavist says: "As always, with caching, there is a balance between the cache size (limiting the memory consumed by the cached objects), the staleness of objects in the cache, and the cost of reloading new ones."

I have never used caching before and therefore have no experience about how to achieve the best amount of caching. Has anyone ever done such thing before? Are there any best practises about this? What should I do to determine the optimal amount of caching?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events