Bug 1784552 - suggest open single tracking bug instead of closed one

This commit is contained in:
Sebastian Hengst 2022-08-12 21:32:50 +02:00
Родитель a404eb9b0a
Коммит 1693aeefb9
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -75,7 +75,7 @@ class FailureSummaryTab extends React.Component {
this.setState({ bugSuggestionsLoading: true });
BugSuggestionsModel.get(selectedJob.id).then(async (suggestions) => {
suggestions.forEach((suggestion) => {
let simpleCase = [];
const simpleCase = [];
// HACK: if not a test failure for any test in error set, ignore
let crashLeak = false;
@ -86,14 +86,14 @@ class FailureSummaryTab extends React.Component {
if (suggestion.bugs.open_recent.length > 0) {
suggestion.bugs.open_recent.forEach((bug) => {
if (bug.summary.endsWith('single tracking bug')) {
simpleCase = [bug];
simpleCase.push(bug);
}
});
}
if (suggestion.bugs.all_others.length > 0) {
if (simpleCase.length === 0 && suggestion.bugs.all_others.length > 0) {
suggestion.bugs.all_others.forEach((bug) => {
if (bug.summary.endsWith('single tracking bug')) {
simpleCase = [bug];
simpleCase.push(bug);
}
});
}