Get Assignee or user history assigned on a issue?

I want assignee list or user list(Array with name), who ever worked on issue or assigned in issue.

Example. A was assigned on issue, after some time B assigned and then C assigned, so need all 3 assignee name in Array or need history of assignee.

0
3 comments
Official comment

Hello Sumit,

Thank you for your question.

You will need to request the entire issue history and then filter it to find all transitions of the “Assignee” custom field.

Here you can find a sample for requesting the issue activity history: https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues-issueID-activities.html#get_all-ActivityItem-method-sample-1

For your use case, you'll need the “CustomFieldCategory” activity category. Unfortunately, requesting only one particular custom field is impossible, so you'll need to filter out other custom fields from the response.

 

Hi 

I am using this query 

field(id,customField(id,name,value(name)))

Response getting 

{

"field": {

"customField": {

"name": "Assignee",

"id": "94-3",

"$type": "CustomField"

},

"id": "94-3",

"$type": "CustomFilterField"

},

"id": "0-0.10-3586559",

"target": {

"id": "2-712384",

"$type": "Issue"

},

"timestamp": 1711026302412,

"author": {

"name": "Sumit Tiwari",

"$type": "User"

},

"$type": "CustomFieldActivityItem"

}

 

Need name of assignee who assigned , getting only field name and id

 

0

If you need the value of the “Assignee” field that was changed, you need to request it through the “target” attribute of the activity item.

Since the target of the change is the issue, the “target” attribute will represent this issue. You can request values of issue custom fields like this: customFields(name,value(name))

So, the resulting request would look like this:

https://example.youtrack.cloud/api/issues/NP-183/activities?fields=author(name,login),timestamp,target(customFields(name,value(name)))&categories=CustomFieldCategory

I hope this helps. Please let me know if it works for you.

0

Please sign in to leave a comment.