...
Jira admins can change default topN values for worklog entities by setting a system property to the desired limit. System property name for issue worklog entry is jira.safeguards.indexing.issue.worklogs.
It’s also possible to disable the feature by setting the corresponding system property to -1.
Updating the System Properties to change this value
Navigate to JIRA_INSTALL/bin
Edit the setenv file (.bat for windows, .sh for linux)
Change JVM_SUPPORT_RECOMMENDED_ARGS="" to JVM_SUPPORT_RECOMMENDED_ARGS="-Djira.safeguards.indexing.issue.worklogs=5000". Please note that the 5000 is an example value.
Restart Jira