app/buglists/needinfo-escalated.mjs (51 lines of code) (raw):
import * as BugList from "buglist";
/* eslint-disable camelcase */
export function init($container) {
BugList.append({
id: "needinfo-escalated",
$container: $container,
template: "needinfo",
title: "NEEDINFO Escalations",
description:
"NEEDINFO requests generated by the escalation system.\n" +
"Bugs are order by needinfo date, oldest first.\n" +
"Timestamp shows the oldest needinfo request.",
query: {
resolution: "---",
f1: "flagtypes.name",
o1: "substring",
v1: "needinfo",
},
usesComponents: true,
include: (bug) => {
for (const ni of bug.needinfos) {
if (ni.setter === "release-mgmt-account-bot@mozilla.tld") {
return true;
}
}
return false;
},
augment: (bug) => {
for (const ni of bug.needinfos) {
if (ni.setter === "release-mgmt-account-bot@mozilla.tld") {
let nickSuffix = "";
let nameSuffix = "";
if (ni.requestee === bug.triage_owner) {
nickSuffix = " (T)";
nameSuffix = " (Triage Owner)";
} else if (ni.requestee === bug.creator) {
nickSuffix = " (R)";
nameSuffix = " (Reporter)";
}
bug.needinfo_nick = ni.requestee_nick + nickSuffix;
bug.needinfo_name = ni.requestee_name + nameSuffix;
bug.needinfo_date = ni.date;
bug.needinfo_ago = ni.ago;
bug.needinfo_epoch = ni.epoch;
return;
}
}
},
order: (a, b) => a.needinfo_epoch - b.needinfo_epoch,
});
}