How to assign value from "Fix version" field to Issue?

How to assign the desired value from VersionBandlу to a specific Issue?

In my example Issue id is 2-1, VersionBandle id is 85-1, current value id from VersionBundle - 105-10, desired value id - 105-12:

GET request for list my VersionBundle:

/api/admin/customFieldSettings/bundles/version/85-1?fields=id,values(id,name,released,releaseDate,archived,description,ordina,hasRunningJob,color,bundle(isUpdateable))

Result:

{
"values": [
{
"bundle": {
"isUpdateable": true,
"$type": "VersionBundle"
},
"released": false,
"archived": false,
"releaseDate": null,
"hasRunningJob": false,
"description": "fix04 desc",
"color": {
"$type": "FieldStyle"
},
"name": "fix04",
"id": "105-10",
"$type": "VersionBundleElement"
},
{
"bundle": {
"isUpdateable": true,
"$type": "VersionBundle"
},
"released": false,
"archived": false,
"releaseDate": null,
"hasRunningJob": false,
"description": "fix05 desc",
"color": {
"$type": "FieldStyle"
},
"name": "fix05",
"id": "105-12",
"$type": "VersionBundleElement"
}
],
"id": "85-1",
"$type": "VersionBundle"
}

GET request for list propierties from my tets Issue:

/api/issues/2-1/customFields?fields=id,value(id,name,login,fullName),projectCustomField(id,field(id,name))

Result:

.................................................
{
"projectCustomField": {
"field": {
"name": "Fix versions",
"id": "75-5",
"$type": "CustomField"
},
"id": "97-4",
"$type": "VersionProjectCustomField"
},
"value": [
{
"name": "fix04",
"id": "105-10",
"$type": "VersionBundleElement"
}
],
"id": "97-4",
"$type": "MultiVersionIssueCustomField"
},
...................................................................

1 comment
Comment actions Permalink
Official comment

Hello,

Please refer to this guide to learn how to set a value for an issue field: https://www.jetbrains.com/help/youtrack/standalone/api-how-to-update-custom-fields-values.html and let me know if you face any questions. 

Please sign in to leave a comment.