clever_cottonmouth
Not able to store data in database
using (var context = _contextResolver())
{
List<JiraRelease> fullAPIList = new List<JiraRelease>();
List<Project> projects = context.Projects.ToList();
foreach (Project project in projects)
{
string _url = $"rest/api/3/project/{project.Key}/version";
var jsonObject = await _jiraClient.GetAsync(_url);
if (jsonObject["values"] != null && jsonObject.HasValues) { List<JiraRelease> release = jsonObject["values"]. Select(x => { JiraRelease data = new JiraRelease(); data.FixVersionID = x.Value<string>("id"); data.ProjectKey = project.Key; data.FixVersion = x.Value<string>("name"); int statusInt = x.Value<string>("released") == "true" ? 1 : 0;
data.Status = statusInt.ToString(); data.ReleaseDate = x.Value<string>("releaseDate"); return data; }).ToList();
if (jsonObject["values"] != null && jsonObject.HasValues) { List<JiraRelease> release = jsonObject["values"]. Select(x => { JiraRelease data = new JiraRelease(); data.FixVersionID = x.Value<string>("id"); data.ProjectKey = project.Key; data.FixVersion = x.Value<string>("name"); int statusInt = x.Value<string>("released") == "true" ? 1 : 0;
data.Status = statusInt.ToString(); data.ReleaseDate = x.Value<string>("releaseDate"); return data; }).ToList();
27 replies