Skip to content

Commit

Permalink
✨ TWEAK: add bug data to init event
Browse files Browse the repository at this point in the history
  • Loading branch information
warengonzaga authored May 25, 2023
1 parent 2775998 commit 21285e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,13 @@ client.on('threadCreate', async post => {
const resolutionTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_resolve}!A2:B,2,0))`;
const closeTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_close}!A2:B,2,0))`;
const escalationTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_escalate}!A2:B,2,0))`;
const bugTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_bug}!A2:B,2,0))`;
const responder = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_response}!A2:A,${config.datasheet_response}!C2:C},2,0))`;
const resolvedBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_resolve}!A2:A,${config.datasheet_resolve}!C2:C},2,0))`;
const closedBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_close}!A2:A,${config.datasheet_close}!C2:C},2,0))`;
const escalatedBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_escalate}!A2:A,${config.datasheet_escalate}!C2:C},2,0))`;
const escalationLink = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_escalate}!A2:A,${config.datasheet_escalate}!D2:D},2,0))`;
const bugBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_bug}!A2:A,${config.datasheet_bug}!C2:C},2,0))`;

// send the data
sendData({
Expand All @@ -345,6 +347,8 @@ client.on('threadCreate', async post => {
escalation_time: escalationTime,
escalated_by: escalatedBy,
escalation_link: escalationLink,
bug_time: bugTime,
bug_by: bugBy
}, config.datasheet_init);
});

Expand Down

0 comments on commit 21285e6

Please sign in to comment.