Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hello,
I would like to add a requirement item to the Verifies field, as shown in the attached example. To perform this “Add” action via the API, I used the items/{item_id} PUT API with the following body:
{ "subjects": [ { "id": {req_item_id}, "name": "Supports VOR(32 or 8kbit)", "type": "TrackerItemReference" } ] }
However, when I sent the /v3/items/{item_id} PUT request, I received an error: "State transition from New to -- is not defined for [HARDTC-{item_id}]".
Could you let me know if there is something I am doing incorrectly, or if I should be using a different API for this operation?
Thank you for your assistance.
Solved! Go to Solution.
Hi @현전_11616217
Hi @현전_11616217 ,
First I would suggest that you use GET /api/v3/items/{itemid}/fields to obtain the ID of the "Verifies" field.
Once you know the ID, you can proceed with the second step, using PUT /api/v3/items/{itemid}/fields endpoint to update the "Verifies" field with the necessary requirement item.
This is an example with step by step examples:
Here is an example where I already have an item added in the Verifies field:
2. With the information about the reference field, you can go to the next endpoint PUT api/v3/items/{itemID}/fields and update the Verifies field
Json body should look like this:
{
"fieldValues": [
{
"fieldId": 17,
"name": "Verifies",
"values": [
{
"id": 1074,
"name": "srs3",
"type": "TrackerItemReference",
"angularIcon": "lightbulb",
"iconColor": "#b31317",
"propagateSuspects": false,
"trackerKey": "SRS",
"trackerTypeId": 16,
"uri": "/issue/1074",
"referenceData": {
"suspectPropagation": "PROPAGATE"
}
}
],
"sharedFieldNames": [],
"type": "ChoiceFieldValue"
}
]
}
Let me know if this helped.
Hi @현전_11616217
Thank you for your question!
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Also, feel free to add any additional information you think might be relevant.
Best regards,
Hi @현전_11616217
Hi @현전_11616217 ,
First I would suggest that you use GET /api/v3/items/{itemid}/fields to obtain the ID of the "Verifies" field.
Once you know the ID, you can proceed with the second step, using PUT /api/v3/items/{itemid}/fields endpoint to update the "Verifies" field with the necessary requirement item.
This is an example with step by step examples:
Here is an example where I already have an item added in the Verifies field:
2. With the information about the reference field, you can go to the next endpoint PUT api/v3/items/{itemID}/fields and update the Verifies field
Json body should look like this:
{
"fieldValues": [
{
"fieldId": 17,
"name": "Verifies",
"values": [
{
"id": 1074,
"name": "srs3",
"type": "TrackerItemReference",
"angularIcon": "lightbulb",
"iconColor": "#b31317",
"propagateSuspects": false,
"trackerKey": "SRS",
"trackerTypeId": 16,
"uri": "/issue/1074",
"referenceData": {
"suspectPropagation": "PROPAGATE"
}
}
],
"sharedFieldNames": [],
"type": "ChoiceFieldValue"
}
]
}
Let me know if this helped.
Hi @현전_11616217 ,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,