Any migration from Cloud to Server will require rewriting scripts.

The process of migrating from Cloud to Server is a more straight forward procedure than from Server to Cloud, however, you should still ensure the correct process is followed. All ScriptRunner features in the Cloud version are available in the Server version.

The process for migration follows the same general path of discovery, analysis and implementation so much of the migration approach for Server to Cloud also applies to Cloud to Server.

First you need to find all scripts in ScriptRunner for Jira Cloud and analyze the functionality. Remember that ScriptRunner for Jira Server has first class support for calculated fields. Next, each script needs to be ported from the REST API into the Java API. The ScriptRunner for Jira Server documentation has examples and guides for implementing scripts.