How to activate script runner "Switch User Function" on cloud?

rohith.kotwal March 20, 2023

Switch User Function: 
I have seen this functionality on server but not on cloud. Could you help us to get this on our cloud.

2 answers

0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2023

Hi,

Welcome to the community

Unfortunately this function doesn't exists in Cloud

https://docs.adaptavist.com/sr4jc/latest/differences-between-scriptrunner-for-jira-server-and-jira-cloud/feature-parity

0 votes
Juan Carlos Vera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2023

Hi @rohith.kotwal ,

The "Switch User Function" is not available in the Jira Cloud version of ScriptRunner.

However, ScriptRunner for Jira Cloud does offer a "Run As" function that allows you to execute a script as another user. To use this feature, you will need to have the appropriate permissions to run scripts in ScriptRunner.

To access the "Run As" function, follow these steps:

  • Navigate to the Script Console in Jira Cloud.
  • Select "Run As" from the dropdown menu.
  • Enter the username of the user you want to run the script as.
  • Click the "Run" button to execute the script.

 

Image Sample:

Runas_Scriptrunner.JPG

rohith.kotwal March 20, 2023

What type of permission are required to run the script? I'm site admin for the Jira. 
Unable to enter any user name in the Run as field.

Juan Carlos Vera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2023

Sorry, I have tested it.. and the "Run as" option only Show Automation user and current user.

You can use the option "As this user:" in the Scheduled job of Sript Runner.. but is not the solution that you need.

 

Sorry for the inconvenience.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events