user717847
user717847

Reputation: 766

Youtrack API doesn't return populated reporter on tickets

I am attempting to query tickets from the API, using:

/issues?fields=idReadable,summary,reporter,created&query=project:$project&$top=100

This results in a list of tickets like:

{"idReadable":"INF-6810","summary":"xxx: Add an SSL cert for this domain into the staging ELB","reporter":{"$type":"User"},"created":1653411002240,"$type":"Issue"}

As you can see, reporter is not populated correctly - it only has a type field. How do I get reporter to be fully populated, with an email or name?

Upvotes: 0

Views: 453

Answers (2)

Your request is needed to be modificated:

/issues?fields=idReadable,summary,reporter(login,email),created&query=project:$project&$top=100

Ofc, you can use any available attributes of User.

Upvotes: 0

Liubov Dievskaia
Liubov Dievskaia

Reputation: 366

If you don't request any extra attributes for the reporter, you only get the type of the reporter entity (User).

To request attributes of the reporter, list them in brackets, for example: /issues?fields=idReadable,summary,reporter(id,login,email),created

Upvotes: 0

Related Questions