Is the add worklog API working as expected with 'author'?

Hello, we are using the 'Cloud' version of Jira and I'm trying to add a worklog to a ticket programatically.  The issue I'm having is that I would like to use a "system account" to call the API and then associate the worklog with the user I specify in the request. As documented here  this appears to be supported by adding an "author" and "updateAuthor" object to the POST.  However, when I do that, the response I get consistently has the user that I authenticated against the API with as the "User" associated with the worklog as opposed to the one I specified in the request.

Here are the steps to reproduce what I'm trying to describe:

  1. Create request with user "bob" credentials.
  2. Call "add worklog" with an object like this:
{ comment: 'I did some work here.', started: '2017-09-29T09:00:00.000+0000', timeSpentSeconds: 7200, author: joe, updateAuthor: joe }

where 'joe' is a user object as specified in the doc like this (real account info replaced with fake values):

{ name: 'joe', key: 'joe', accountId: 'some-id', emailAddress: '', avatarUrls: { '16x16': '', '24x24': '', '32x32': '', '48x48': '' }, displayName: 'Joe', active: true, timeZone: 'America/Los_Angeles' }

The API call succeeds but returns this (again, real account info replaced with fake values):

{ self: '',  author:   { self: '',      name: 'bob',     key: 'bob',     accountId: ‘bobs-account-id',     emailAddress: ‘',      ... },  updateAuthor:     { self: '',     name: 'bob',     key: 'bob',     accountId: ‘bobs-account-id',     emailAddress: ‘',      ... },  comment: 'I did some work here.',  created: '2017-10-03T11:15:30.431-0600',  updated: '2017-10-03T11:15:30.431-0600',  started: '2017-09-29T03:00:00.000-0600',  timeSpent: '3h',  timeSpentSeconds: 10800,  id: '44955',  issueId: '59424' }

Note that the 'author' and 'updateAuthor' have both been returned as the user "Bob" instead of "Joe" which I posted in the request.

I've poked around the docs for quite a while trying to figure out what I may be doing wrong but I'm just not seeing it.  Can someone confirm that the API is working the way it should or let me know if this is an unreported bug?  Any help appreciated, thanks!

1 answer

Hi Joe,

From JRASERVER-30197 and JRACLOUD-30197 it doesn't look like you're doing anything wrong.  Take a look at the Product Manager's response that I linked.

Please vote on JRASERVER-30197 and JRACLOUD-30197 to add your use case to the comments so we can add impact and get traction on this.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

846 views 3 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you