Skip to content

Commit 3e68cf5

Browse files
committed
TD-5220 Adds FC.ID to ORDER BY clauses to ensure better comparison of order for ungrouped competencies
1 parent 92b6638 commit 3e68cf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,7 @@ Competencies AS c INNER JOIN
24352435
CompetencyGroups AS cg ON fcg.CompetencyGroupID = cg.ID
24362436
WHERE (fc.FrameworkID = @frameworkId)
24372437
GROUP BY fc.ID, c.ID, cg.Name, cg.Description, c.Name, c.Description, c.AlwaysShowDescription, fcg.Ordering, fc.Ordering
2438-
ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering",
2438+
ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering, fc.ID",
24392439
new { frameworkId }
24402440
);
24412441
}
@@ -2448,7 +2448,7 @@ public List<int> GetFrameworkCompetencyOrder(int frameworkId, List<int> framewor
24482448
FROM FrameworkCompetencies AS fc LEFT JOIN
24492449
FrameworkCompetencyGroups AS fcg ON fc.FrameworkCompetencyGroupID = fcg.ID
24502450
WHERE (fc.FrameworkID = @frameworkId) AND (fc.ID IN @frameworkCompetencyIds)
2451-
ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering",
2451+
ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering, fc.ID",
24522452
new { frameworkId, frameworkCompetencyIds }
24532453
).ToList();
24542454
}

0 commit comments

Comments
 (0)