Skip to content

Commit

Permalink
fix(issues): #4540 Fix issues being merged for items bearing the same…
Browse files Browse the repository at this point in the history
… name

Fix issues being merged for items bearing the same name
  • Loading branch information
tidusjar authored Mar 29, 2022
2 parents 9033f1d + 73d438f commit 490e78f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Ombi.Core/Engine/V2/IssuesEngine.cs
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ public IssuesEngine(IRepository<IssueCategory> categories,
public async Task<IEnumerable<IssuesSummaryModel>> GetIssues(int position, int take, IssueStatus status, CancellationToken token)
{
var issues = await _issues.GetAll().Where(x => x.Status == status && x.ProviderId != null).Skip(position).Take(take).OrderBy(x => x.Title).ToListAsync(token);
var grouped = issues.GroupBy(x => x.Title, (key, g) => new { Title = key, Issues = g });
var grouped = issues.GroupBy(x => new { x.Title, x.ProviderId }, (key, g) => new { key = key, Issues = g });

var model = new List<IssuesSummaryModel>();

@@ -42,8 +42,8 @@ public async Task<IEnumerable<IssuesSummaryModel>> GetIssues(int position, int t
model.Add(new IssuesSummaryModel
{
Count = group.Issues.Count(),
Title = group.Title,
ProviderId = group.Issues.FirstOrDefault()?.ProviderId
Title = group.key.Title,
ProviderId = group.key.ProviderId
});
}

0 comments on commit 490e78f

Please sign in to comment.