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 Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

883 views 5 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot