Reputation: 3581
I am using jira-python and request API to log work to JIRA tickets with the user and activity info but can't figure out a way to do it . I have the following code :
jira.add_worklog("issue number", timeSpent="2h", user="username")
but it seems to ignore the user keyword. I am also looking up JIRA API with request library but can't seem to find an API to log work with activity and user info.
Upvotes: 5
Views: 6443
Reputation: 121
It is not needed to add inside the arguments the user. you can use the following code:
jira.add_worklog("issue number", timeSpent="2h")
Yo can add other arguments like:
You can find more info about it in jira python api
Upvotes: 4
Reputation: 8617
There's no direct support for this action, see this discussed in
https://answers.atlassian.com/questions/29951977
and
https://jira.atlassian.com/browse/JRA-30197
It's possible to impersonate another user, either by writing an add-on with the ACT_AS_USER
scope or by registering your application with Oauth2 authentication in your Jira configuration, for example as discussed here:
https://answers.atlassian.com/questions/247528/how-do-you-impersonate-a-user-with-jira-oauth
You'd probably be better off discussing implantation suggestions on answers.atlassian.com.
Upvotes: 0