Details
-
Bug
-
Status: Done
-
High
-
Resolution: Done
-
5.6.2.1-jira8
-
None
-
None
-
Sprint 66
-
0.2
Description
Script fields caching doesn't take account of the current user, it should do.
Using a script field for user-specific information is a bad idea, because it means by definition you cannot index and search on it, as the search index would need to have a range of different values.
A web panel is a better option for this kind of data.
Another workaround is to disable the cache, which caches values for 10 seconds, providing various inputs are unchanged.
You can disable the cache by adding:
ENABLE_CACHE = { -> false }
to your script.
However to avoid any possible security issues this change will be to add the current user as an input to the cache key, so a user will not get the cached value for another a user.