Description
When connecting to an internal database resource, ScriptRunner always tries to set the connection to read-only. This is sensible for safety purposes, but there are circumstances under which it cannot be done: during a workflow transition, for example, since the readonly status of the connection cannot be altered while a database transaction is in progress. At the moment, trying to set the connection to read-only in such contexts results in an unhandled error: we should add handling that either notifies the user in the logs that the resource cannot be used, or else allows the connection to proceed in non-readonly mode (perhaps with a safety warning in the logs).