Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal error when I try to add a worklog

Carlos Vinicius
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 19, 2017

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!

2 answers

0 votes
Huseyin beyan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2019

  

0 votes
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 21, 2017

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
TAGS
AUG Leaders

Atlassian Community Events