Modifying a Tracker Item
Modifying the Tracker Item as a REST Resource
PUT /v3/items/{itemId} will replace the whole state of the tracker item as it is provided in the request body.
For example there is an existing item:
{
"id": 1336,
"name": "Implement car software",
"descriptionFormat": "PlainText",
"createdAt": "2020-08-05T14:11:40.517",
"createdBy": {
"id": 1,
"name": "bond",
"type": "UserReference"
},
"modifiedAt": "2020-08-05T14:11:40.517",
"modifiedBy": {
"id": 1,
"name": "bond",
"type": "UserReference"
},
"version": 1,
"assignedTo": [],
"storyPoints": 5,
"tracker": {
"id": 4308,
"name": "Tasks",
"type": "TrackerReference"
},
"children": [],
"customFields": [],
"priority": {
"id": 2,
"name": "High",
"type": "ChoiceOptionReference"
},
"status": {
"id": 1,
"name": "New",
"type": "ChoiceOptionReference"
},
"subjects": [
{
"id": 1007,
"name": "As User, I want to have a software in my car, which is easy to use",
"type": "TrackerItemReference"
}
],
"resolutions": [],
"severities": [],
"teams": [],
"versions": [],
"ordinal": 16,
"typeName": "Task",
"comments": []
}
To change only the name of the item the whole model must provided with the modified name property.
Request body:
{
"id": 1336,
"name": "New name",
"descriptionFormat": "PlainText",
"createdAt": "2020-08-05T14:11:40.517",
"createdBy": {
"id": 1,
"name": "bond",
"type": "UserReference"
},
"modifiedAt": "2020-08-05T14:11:40.517",
"modifiedBy": {
"id": 1,
"name": "bond",
"type": "UserReference"
},
"version": 1,
"assignedTo": [],
"storyPoints": 5,
"tracker": {
"id": 4308,
"name": "Tasks",
"type": "TrackerReference"
},
"children": [],
"customFields": [],
"priority": {
"id": 2,
"name": "High",
"type": "ChoiceOptionReference"
},
"status": {
"id": 1,
"name": "New",
"type": "ChoiceOptionReference"
},
"subjects": [
{
"id": 1007,
"name": "As User, I want to have a software in my car, which is easy to use",
"type": "TrackerItemReference"
}
],
"resolutions": [],
"severities": [],
"teams": [],
"versions": [],
"ordinal": 16,
"typeName": "Task",
"comments": []
}
Please note: if only the name parameter is provided then it will mean that all other fields needs to be cleared.
The following request body will return an error as the status field cannot be cleared:
{
"name": "New name 2"
}
Error response:
{
"message": "State transition from New to -- is not defined for [TASK-1336] - New name",
"resourceUri": "/items/1336"
}
Was this helpful?