Does Anyone know how to change the run by User, in Script Listeners?
Because in Scheduled Jobs you can choose, who to use and not only the current user or the ScriptRunner Add-On User. (-> Is changing the Name of the Add-On User possible?)
Or is there a way to run scheduled Jobs more frequently than every hour?
Is it possible to modify Scripts using the expression "0 0/30 * 1/1 * ? *" similar to Jira Server?
You can use such script:
ApplicationUser user = userManager.getUserByName(username) as ApplicationUser
ComponentAccessor.jiraAuthenticationContext.setLoggedInUser(user)
Made a small repo with examples, and classes with basic functions. You can look if you like
https://github.com/Udjin79/SRUtils
UPD.
Oh, it's Cloud, sorry, my solution won't work, I have to adapt it to Cloud SR, if it's possible, of course :(
Hi @Thanh
To answer your question, for cloud this is not doable.
When using a listener in the cloud, you have 2 options to set the user, i.e. via the As This User List. In the list, you have 2 options, i.e. either the Current User or the ScriptRunner Addon User.
There isn't any custom script for this at the moment.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.