diff --git a/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs b/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs index cc4e7b6c..03934fad 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Agent/Contracts/AgentJobHistoryInfo.cs @@ -42,6 +42,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts public string StepName { get; set; } public string Message { get; set; } public DateTime RunDate { get; set; } + public int RunStatus { get; set; } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs b/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs index ebab1728..c91b79b7 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Agent/JobUtilities.cs @@ -114,11 +114,13 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent string stepName = Convert.ToString(jobRow[UrnStepName], System.Globalization.CultureInfo.InvariantCulture); string message = Convert.ToString(jobRow[UrnMessage], System.Globalization.CultureInfo.InvariantCulture); DateTime runDate = Convert.ToDateTime(jobRow[UrnRunDate], System.Globalization.CultureInfo.InvariantCulture); + int runStatus = Convert.ToInt32(jobRow[UrnRunStatus], System.Globalization.CultureInfo.InvariantCulture); AgentJobStep step = new AgentJobStep(); step.StepId = stepId; step.StepName = stepName; step.Message = message; step.RunDate = runDate; + step.RunStatus = runStatus; return step; } }