I was trying to update original estimates through code but the docs were misleading on that regard.
The edit issue API docs said that I can identify the editable fields by calling the edit-meta API.
I called the edit-meta API which returned the following response (ie. showing portions of the response only to clarify my problem)
{
"id": "timetracking",
"key": "timetracking",
"name": "Time tracking",
"custom": false,
"orderable": true,
"navigable": false,
"searchable": true,
"clauseNames": [],
"schema": {
"type": "timetracking",
"system": "timetracking"
}
},
...
{
"id": "timeoriginalestimate",
"key": "timeoriginalestimate",
"name": "Original estimate",
"custom": false,
"orderable": false,
"navigable": true,
"searchable": false,
"clauseNames": [
"originalEstimate",
"timeoriginalestimate"
],
"schema": {
"type": "number",
"system": "timeoriginalestimate"
}
},
Both clauses don't clarify that to update the original estimate field, I must send the following payload to the edit-issue API:
{
"fields": {
"timetracking": {
"originalEstimate": 1440
}
}
}
As you can see, the originalEstimate field is enclosed in a timetracking object.
I have been trying to send the following payload instead, but kept throwing errors
{
"fields": {
"originalEstimate": 1440
}
}
So could I have figured that out on my own!
I admit that the edit-issue API docs gave a clue to that. But what about other fields with a similar case? I mean, how can I rely on the docs if they don't guide me to the valid structure for that field and others too?
@Gelbana It has it right in the example JSON. I am pretty sure that it has been that way forever in the documentation. I have never had issues with the documentation. I would recommend look at the examples.
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.