I'm trying to update my worklog via Tempo API, but it returns 500 - java.lang.NullPointerException
Request: https://{name}.atlassian.net/rest/tempo-timesheets/3/worklogs/{worklogid}/
body: { timeSpentSeconds: 3000 } headers: { Authorization: Basic: {key} }
Any ideas what am I doing wrong?
Longer error stack:
java.lang.NullPointerException at com.tempoplugin.worklog.restv3.WorklogsResource$UpdateBeanValidator.getWorklogBuilder(WorklogsResource.java:432) at com.tempoplugin.worklog.restv3.WorklogsResource$BeanValidator.validate(WorklogsResource.java:379) at com.tempoplugin.worklog.restv3.WorklogsResource.updateWorklog(WorklogsResource.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:83) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53) at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:41) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:110) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:190) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at (...)
Hi Alexander,
can you change the body of your PUT request to:
{
"timeSpentSeconds": 14400,
"issue":{
}
}
Please note that you need to add that this is of Content-Type application/json
Regards,
Susanne
Thanks a lot, that's what I needed!
It would be nice to update the api documentation about the fields that are required:
http://tempo.io/doc/timesheets/api/rest/latest/#2025206437
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure that Tempo plugin version is compatible to your JIRA version?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.