At the moment we use own tool that automatically saves working time of staff to Redmine, using User Impersonation
Does JIRA API allow to save spent time on behalf of other users?
The REST API does not directly support impersonation of users, but there is a plugin for that:
https://marketplace.atlassian.com/plugins/com.jirasudo.jira-sudo/server/overview
Please note that this would only work for JIRA Server.
Which API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For REST, then see Stephen's answer.
The Java API supports it, in the sense that you can write add-ons to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How about when using scriptrunner and groovy within a custom rest endpoint?
import com.atlassian.jira.component.ComponentAccessor
def jiraAuthenticationContext = ComponentAccessor.getJiraAuthenticationContext()
def originalUser = jiraAuthenticationContext.getLoggedInUser()
def userManager = ComponentAccessor.getUserManager()
def adminUser = userManager.getUserByName("deployer")
assert adminUser // make sure an admin user called "deployer" exists in all instances
try {
jiraAuthenticationContext.setLoggedInUser(adminUser)
// make REST requests here
}
finally {
jiraAuthenticationContext.setLoggedInUser(originalUser)
}
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.