in src/content/components/Uplift/Uplift.js [23:98]
async componentWillMount() {
this._isMounted = true;
const trackingField = `cf_tracking_firefox${this.props.prevRelease}`;
const statusField = `cf_status_firefox${this.props.prevRelease}`;
const statusNightly = `cf_status_firefox${this.props.release}`;
const prevRelease = this.props.prevRelease;
function getFlagQuery(type) {
return {
include_fields: columns.concat([
trackingField,
statusField,
statusNightly,
]),
component: BUGZILLA_TRIAGE_COMPONENTS,
target_milestone: ["---", `firefox ${prevRelease + 1}`],
order: "changeddate DESC",
custom: {
"flagtypes.name": { substring: `approval-mozilla-beta${type}` },
},
};
}
const betakey = `cf_tracking_firefox${prevRelease}`;
await this.context.qm.runCachedQueries(
[
getFlagQuery("?"),
getFlagQuery("-"),
getFlagQuery("+"),
{
include_fields: columns.concat([
trackingField,
statusField,
statusNightly,
]),
component: BUGZILLA_TRIAGE_COMPONENTS,
order: "changeddate DESC",
custom: {
[betakey]: { anyexact: ["?", "+", "blocking"] },
"flagtypes.name": { notsubstring: `approval-mozilla-beta` },
},
},
],
() => this._isMounted,
({
rsp: [
{ bugs: upliftRequested },
{ bugs: upliftDenied },
{ bugs: upliftComplete },
{ bugs: tracking },
],
awaitingNetwork,
}) =>
this.setState({
loaded: true,
awaitingNetwork,
bugs: {
tracking,
upliftRequested,
upliftApproved: upliftComplete.filter(
b =>
b.cf_tracking_beta === "+" &&
!["verified", "fixed"].includes(b.cf_status_beta)
),
upliftDenied: upliftDenied.filter(
b =>
b.cf_tracking_beta === "+" &&
!["verified", "fixed"].includes(b.cf_status_beta)
),
upliftComplete: upliftComplete.filter(
b =>
b.cf_tracking_beta === "+" &&
["verified", "fixed"].includes(b.cf_status_beta)
),
},
})
);
}