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

This widget could not be displayed.

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 Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,481 views 10 12
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