Background info: (we wish the Summary field was not required by Jira, but since it is we have to work around it somehow. Ideally, we just want the Description field with the Summary being a shortened version of the Description field.)
For our specific uses, on the Issue Create screen, we have the Summary field set to hidden. Currently, we are using the Jira Suite Utilities add-on and use it as post-function when the issue is created to copy the Description field value to the Summary field value. However, sometimes the description entered by the customer is way too long and we only want about the first 100 characters of the description field to copy to the summary, sort of as a 'preview'.
For example, if the Description entered by the customer is: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum", we need the summary to be just the first part; something like: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt..." with possibly the 3 trailing dots at the end to indicate that there is more.
Is there a way to do this? We have ScriptRunner, but have not learned how to use it yet. I have no idea what kind of script I would need to write. Any help in the right direction is much appreciated.