Script Fields FAQ
Will Guardrails affect my script fields?
Guardrails were introduced in Jira 8.22.2 to limit the impact that re-indexing would have on performance. Generally, this is a good thing for Jira and ScriptRunner.
Script fields shouldn't be affected by safeguards, and you may even see an improvement in performance. Script fields are indexed at the issue level, so the safeguards around comments, change logs, and work logs won't affect a script field's output.
Even if your script field reads from the issue's comments, work logs, or change logs, the information is accessed through the standard Atlassian Java API, which reads from the database not the indexes. For example, the following will load the whole list of comments from the issue, not just the top 500:
import com.atlassian.jira.component.ComponentAccessor
def commentManager = ComponentAccessor.commentManager
commentManager.getComments(issue)
As long as you follow the recommendations on the Script Fields Tips page, your script fields should work alongside Jira Guardrails.