JetBrains / YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
https://www.jetbrains.com/youtrack
Apache License 2.0
135 stars 105 forks source link

Consistent handling of Assignee-type fields #97

Closed Elwetana closed 4 years ago

Elwetana commented 4 years ago

I respectfully submit my changes to files Field.cs and Issue.cs. They try to make it easier to handle fields of the Assignee type.

The first change, in the file Field.cs, addresses the situation when the field is List<Assignee> (this is true even if there is only one assignee) and returns their full name (instead of a list formatted as string).

The second change, in the file Issue.cs, tries to support fields that have Assignee type, but a different name (e.g. Owner, Tester and so on).

The last change simply adds a method to retrieved field names, this feels like reasonable change as we already have a method to retrieve field values.

Thank you for considering this request.

maartenba commented 4 years ago

Looks great, thanks @Elwetana !