Jira-Sudo not working when creating comment

bbogovich-vs January 7, 2020

We're creating a custom portal/front-end for a client using JIRA as a back-end, so this plugin seems perfect for our needs.  However, we're running into an issue: it doesn't seem to work when trying to add a comment to an issue.  Our code is using RestSharp, so we proxied traffic through Fiddler to capture the raw request to verify that the sudo header is there, and it is, but the author of the created comment was still the service account and not the impersonated user.

Raw request (parts redacted and elided for brevity):

POST https://xxxxx.com/rest/api/2/issue/xxxxx/comment HTTP/1.1
...
sudo: xxxxxx%40vividsites.com
...

{
"author": {
"name": "xxxxxx@vividsites.com"
},
"body": "testing comment w/sudo"
}

Result (parts redacted and elided for brevity):

{
...
"author": {
...
"name": "xxxxx", (the service account, not the impersonated user)
...
}
...
}

The plugin does appear to be installed and enabled (this JIRA instance isn't under our control), so are we missing something?  The JIRA instance is self-hosted and running v8.5.0.

(Note: the actual JIRA user key of the user we are testing with is an email address, so we're not confusing the sudo header with the sudo-email version.  However, we also tried a test with Postman using the sudo-email header and the test user's email address and got the same results.  We also tried using the internal JIRA identifier for the user, e.g. JIRAUSERxxxx, and that didn't work either.)

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events