Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I have created a Script field that displays the time taken to complete workflow transition.

Nellutla Eshwar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2024

I have created a Script field that displays the time taken to complete workflow transition. It displays in a format 0D 0H 0m 0s it works like a real time process and it is not storing data in the database. I would like to store the data for this script field in the database. The field is created with Text field (multi-line) template.

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Radek Dostál
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.
September 20, 2024

You don't want to store script fields in the database (I think they don't even do any of it technically if I recall, it just caches the value I think, and it stores the value to index at certain operations, but not write the value to the db).

 

The whole point of script fields is to render dynamic data, and the amount of times it recalculates is humongous (which I believe is the word adaptavist uses in their documentation).

Long story short, if you really want to store the values, you would need to do this yourself (such as exporting the values and then saving them in a different field, or not using scripted field altogether and instead storing the value to a field during a workflow transition).

Nellutla Eshwar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2024

Thanks for the suggestion. As you mentioned above I need to export the value of this script field  into another field how can I do this can you please share any info regarding this and another thing ( instead storing the value to a field during a workflow transition) how can I perform this activity I need to calculate the time that took for a issue in real-time and it need to store in the db any other suggestions for this.

 

DEPLOYMENT TYPE
SERVER
VERSION
7.11.0
TAGS
AUG Leaders

Atlassian Community Events