Internal error when I try to add a worklog

Hi guys,

   I am facing some problems when I try to add a worklog.

the url is

https://<MYACCOUNT>.atlassian.net/rest/api/2/issue/<ISSUE_ID>/worklog

and the json is

{"comment":"MyTimeTracker Input","started":"2017-08-20T01:20:38.957-03:00","timeSpent":"20m"}

and always when I post this I receive Internal Server Error.

 

Could you please help me with this issue!?

Tks in advance!

1 answer

0 votes

Hi Carlos,

I found this code to work:

'{"timeSpent":"20m","comment":"MyTimeTracker Input","started":"2017-08-20T01:20:38.957-0300"}'

I think there's a couple things going on here:

  1. If you only change the time it does not work and you get a 500 error.
  2. If you put timeSpent at the beginning it works.
  3. If you change the time back to -03:00 you get a 500 error.

From the testing there are two issues here:

  1. timeSpent needs to be first
  2. You're running into the bug reported in JRASERVER-31460 where the JIRA REST API throws a 500 error code instead of a400 error code with a proper message when an invalid expand value is passed to search the JQL endpoint.

Please vote on JRASERVER-31460 to add impact and test with timeSpent in the beginning to see if you get different results.

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 05, 2018 in Jira Software

Jack Graves: Real Ale enthusiast with a knack for Jira Software implementation

@Jack Graves [AC] first caught our eye with his incredible breakdown of what, in his opinion, can make or break a Jira software implementation. (Read his thoughts on this thread)! In this follow...

96,857 views 4 14
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