Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

rohith_kotwal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

1 vote
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
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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.

0 votes
Mohamed Benziane
Community Champion
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

Suggest an answer

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

Atlassian Community Events