Skip to content

Commit

Permalink
Bug 1355141 - Make autoclassify's bugfiler work again (#2332)
Browse files Browse the repository at this point in the history
  • Loading branch information
KWierso authored and jgraham committed Apr 12, 2017
1 parent bc92584 commit aa2a9f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ui/plugins/auto_classification/controller.js
Expand Up @@ -155,6 +155,17 @@ treeherder.controller('ThClassificationOptionController', [
var logUrl = ctrl.thJob.logs.filter(x => x.name.endsWith("_json"));
logUrl = logUrl[0] ? logUrl[0].url : ctrl.thJob.logs[0];

var crashSignatures = [];
var crashRegex = /application crashed \[@ (.+)\]$/g;

var crash = ctrl.errorLine.data.bug_suggestions.search.match(crashRegex);
if (crash) {
var signature = crash[0].split("application crashed ")[1];
if (!crashSignatures.includes(signature)) {
crashSignatures.push(signature);
}
}

var modalInstance = $uibModal.open({
templateUrl: 'partials/main/intermittent.html',
controller: 'BugFilerCtrl',
Expand All @@ -167,6 +178,7 @@ treeherder.controller('ThClassificationOptionController', [
reftest: () => thReftestStatus(ctrl.thJob) ? reftestUrlRoot + logUrl + "&only_show_unexpected=1" : "",
selectedJob:() => ctrl.thJob,
allFailures: () => [ctrl.errorLine.data.bug_suggestions.search.split(" | ")],
crashSignatures: () => crashSignatures,
successCallback: () => (data) => {
var bugId = data.success;
ctrl.selectedOption.manualBugNumber = bugId;
Expand Down

0 comments on commit aa2a9f7

Please sign in to comment.