Closed MarkHutchings closed 6 years ago
How many assignees does the issue have?
Just one!
For now I'm doing:
var list = (List<Assignee>)issue.GetField("Assignee").Value;
perhaps that's the preferred solution?
You can just get the issue.Assignee[0]
as well.
Ah, that works if the type is dynamic (i.e. issue.AsDynamic().Assignee[0]).
I have a wrapper class anyway so it's fine for me to do this:
if( _native.GetField( "Assignee" ).Value is List<Assignee> list )
return list[0].UserName;
See: https://github.com/JetBrains/YouTrackSharp/blob/c591920981c9e0b8a4717856934be281b27251ad/src/YouTrackSharp/Issues/Field.cs#L71