Hi. REST API returns user invalid error with some users when creating worklog
{
"errors": {
"worker": "User is invalid"
},
"errorMessages": [],
"reasons": [
"VALIDATION_FAILED"
]
}
Hi Gleb,
can you confirm that the REST API call is working for other users?
Can you please confirm which endpoint you are exactly using and how your payload looks like?
Thanks
Endpoint is /rest/tempo-timesheets/4/worklogs
Request is
{
"worker": "${usr}",
"comment": "${comment}",
"started": "${startFormatted}",
"endDate": "${endFormatted}",
"timeSpentSeconds": "${duration}",
"originTaskId":"${issue}",
"includeNonWorkingDays":"false",
"attributes" : {
"Worktype" : {
"value" : "${workType}"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gleb,
have you checked how the payload looks like in runtime?
BR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Of course. Looks normal
{
"worker": "glebk",
"comment": "Automated Log Work",
"started": "2020-10-20",
"endDate": "2020-10-20",
"timeSpentSeconds": "189",
"originTaskId":"SD-137148",
"includeNonWorkingDays":"false",
"attributes" : {
"_Видработ_" : {
"value" : "test"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gleb,
have you confirmed the username/userkey against the Jira REST API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am facing this issue also.
I can confirm the username/userkey REST call you show above is working correctly.
Also the results of rest/tempo-timesheets/4/worklogs/search do not seem to include my manually added worklogs, even though I am only supplying from/to dates.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.