Skip to content

Commit bfa9d4e

Browse files
update scorecard mapping (#16)
1 parent b367154 commit bfa9d4e

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

src/util/LegacyMapper.ts

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class LegacyMapper {
208208

209209

210210
return {
211-
1: phase.name === "Review" ? this.mapScorecard(subTrack) : undefined, // Scorecard ID
211+
1: this.mapScorecard(subTrack, phase.name), // Scorecard ID
212212
2: phase.name === "Registration" ? '1' : undefined, // Registration Number
213213
3: phase.name === "Submission" ? submissionPhaseConstraint?.value.toString() ?? // if we have a submission phase constraint use it
214214
reviewPhaseConstraint?.value != null ? '1' : undefined // otherwise if we have a review phase constraint use 1
@@ -279,21 +279,40 @@ class LegacyMapper {
279279
}
280280

281281
// prettier-ignore
282-
private mapScorecard(subTrack: string): string {
282+
private mapScorecard(subTrack: string, phase: string): string|undefined {
283283
const isNonProd = process.env.ENV != "prod";
284284

285285
// TODO: Update scorecard ids for all subtracks and check for dev environment
286286

287-
let scorecard = isNonProd ? 30001610 : 30002133; // DEV Challenge
287+
let scorecard = undefined;
288288

289-
if (subTrack === V4_SUBTRACKS.FIRST_2_FINISH) scorecard = isNonProd ? 30002160 : 30002160;
290-
if (subTrack === V4_SUBTRACKS.MARATHON_MATCH) scorecard = isNonProd ? 30001610 : 30002133; // needs to be corrected
291-
if (subTrack === V4_SUBTRACKS.DEVELOP_MARATHON_MATCH) scorecard = isNonProd ? 30001610 :30002160;
292-
if (subTrack === V4_SUBTRACKS.BUG_HUNT) scorecard = isNonProd ? 30001610 :30002133;
293-
if (subTrack === V4_SUBTRACKS.DESIGN_FIRST_2_FINISH) scorecard = isNonProd ? 30001610 :30001040;
294-
if (subTrack === V4_SUBTRACKS.WEB_DESIGNS) scorecard = isNonProd ? 30001610 :30001101;
289+
// F2F
290+
if (subTrack === V4_SUBTRACKS.FIRST_2_FINISH) scorecard = isNonProd ? 30002160 : 30002160; // missing dev scorecard
291+
if (subTrack === V4_SUBTRACKS.DESIGN_FIRST_2_FINISH) scorecard = isNonProd ? 30001610 :30001101; // missing dev scorecard
295292

296-
return scorecard.toString();
293+
// QA
294+
if (subTrack === V4_SUBTRACKS.BUG_HUNT) {
295+
if (phase === "Review") scorecard = isNonProd ? 30001610 : 30001220; // missing dev scorecard
296+
if (phase === "Specification Review") scorecard = isNonProd ? 30001610 : 30001120; // missing dev scorecard
297+
}
298+
299+
// DS
300+
if (subTrack === V4_SUBTRACKS.DEVELOP_MARATHON_MATCH) scorecard = isNonProd ? 30001610 :30002133; // missing dev scorecard
301+
if (subTrack === V4_SUBTRACKS.MARATHON_MATCH) scorecard = isNonProd ? 30001610 : 30002133; // missing dev scorecard
302+
303+
// DESIGN
304+
if (subTrack === V4_SUBTRACKS.WEB_DESIGNS) {
305+
if (phase === "Specification Review") scorecard = isNonProd ? 30001610 : 30001040; // missing dev scorecard
306+
if (phase === "Checkpoint Screening") scorecard = isNonProd ? 30001610 : 30001364; // missing dev scorecard
307+
if (phase === "Checkpoint Review") scorecard = isNonProd ? 30001610 : 30001004; // missing dev scorecard
308+
if (phase === "Screening") scorecard = isNonProd ? 30001610 : 30001363; // missing dev scorecard
309+
if (phase === "Review") scorecard = isNonProd ? 30001610 : 30001031; // missing dev scorecard
310+
if (phase === "Approval") scorecard = isNonProd ? 30001610 : 30000720; // missing dev scorecard
311+
}
312+
313+
if (subTrack === V4_SUBTRACKS.CODE) scorecard = isNonProd ? 30002133 : 30002133; // missing dev scorecard
314+
315+
return scorecard ? scorecard.toString() : undefined;
297316
}
298317
}
299318

0 commit comments

Comments
 (0)