How to get value from issue field "Downtime(minutes)" when the issue is done ?

EXT-Ivan.Kharyuk January 28, 2019

I'm developing .NET application using c#.

I have connected to JIRA via Atlassian SDK.

When I write such query:

var issues = from i in jira.Issues.Queryable
                         where  i.Type == "Incident" &&
                            i.Project == "My Project"
                         && i.Status == "Done"
                          && (i.Priority == "Blocker" || i.Priority == "Critical" || i.Priority == "High")
                         orderby i.Created
                         select i;

foreach (var issue in issues)

{

     issue.Downtime <<------ need to get downtime here

}

 Solution:

var downtime = issue.CustomFields.Where(f =>f.Name=="Downtime (Minutes)").FirstOrDefault();   
                result = result + issue.Key + "\t" + issue.Summary + "\t" + issue.Status + $" Downtime(minutes):{downtime?.Values[0]}"+"\n\r";

1 answer

0 votes
EXT-Ivan.Kharyuk January 28, 2019

Looks like it's a custom field...

Suggest an answer

Log in or Sign up to answer