match agent behavior to ssms (#781)

This commit is contained in:
Aditya Bist
2019-03-29 13:39:42 -07:00
committed by GitHub
parent 9158d86e66
commit c0ec9272b3

View File

@@ -208,12 +208,14 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
// Add steps to the job if any
var jobSteps = new List<AgentJobStep>();
foreach (JobStep step in steps)
foreach (LogSourceJobHistory.LogEntryJobHistory subEntry in entry.SubEntries)
{
var jobId = jobRow[UrnJobId].ToString();
jobSteps.Add(AgentUtilities.ConvertToAgentJobStep(step, logEntry, jobId));
if (steps.Contains(subEntry.StepName))
{
var jobId = jobRow[UrnJobId].ToString();
jobSteps.Add(AgentUtilities.ConvertToAgentJobStep(steps.ItemById(Convert.ToInt32(subEntry.StepID)), logEntry, jobId));
}
}
jobHistoryInfo.Steps = jobSteps.ToArray();
jobs.Add(jobHistoryInfo);
}