To learn more about Tempo products, please visit our Help Center. For support, see our Support Portal.

Data Center API Error: "Missing value for the required work attribute 'xxx' "



This issue is only related to Data Center REST APIs V3 and fixed in V4.

 

I'm using the below POST request to log time https://my-jira-url/rest/tempo-timesheets/3/worklogs/

I'm using the below POST request to log time https://my-jira-url/rest/tempo-timesheets/3/worklogs/

{
"timeSpentSeconds": 7200,
"billedSeconds": 7200,
"dateStarted": "2019-02-18T13:59:00.000",
"comment": "some Comment",
"author":

{ "name": "johnDoe" }

,
"issue":

{ "projectId": 10517, "key": "TICKET-7839", "remainingEstimateSeconds": 0 }

,
"worklogAttributes": [

{ "key": "Activity", "value": "Coding*" }

]
}

Time logging is successful without any "Activity" value being selected even though it is mandatory.

Time logging is successful without any "Activity" value being selected even though it is mandatory.

{
"errors":

{ "_Activity_": "Missing value for the required work attribute 'Activity'" }

,
"errorMessages": [],
"reasons": [
"VALIDATION_FAILED"
]
}

Work around is to replace with following code where "key":"Activity" is replaced with "key":"_Activity_".

Work around is to replace with following code where "key":"Activity" is replaced with "key":"_Activity_".

"worklogAttributes": [ { "key": "_Activity_", "value": "Coding*" } ]