cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Inquiry on Updating Tracker Item Field Values

현전_11616217
4-Participant

Inquiry on Updating Tracker Item Field Values

_11616217_0-1730964986541.png

 

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.

ACCEPTED SOLUTION

Accepted Solutions

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:

 

  1. Use GET /api/v3/items/{itemid}/fields, to find information about the referenced field             

Catnip_3-1731937965814.png

Here is an example where I already have an item added in the Verifies field:

Catnip_5-1731938193305.png

 

 

 

 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.

 

View solution in original post

3 REPLIES 3

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,

Catalina
PTC Community Moderator

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:

 

  1. Use GET /api/v3/items/{itemid}/fields, to find information about the referenced field             

Catnip_3-1731937965814.png

Here is an example where I already have an item added in the Verifies field:

Catnip_5-1731938193305.png

 

 

 

 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,

Catalina
PTC Community Moderator
Announcements



Top Tags