Commit d9ab2703 authored by Sarah GP's avatar Sarah GP

Update checks in the great bug quest

parent 1166c2b8
...@@ -104,12 +104,7 @@ export default { ...@@ -104,12 +104,7 @@ export default {
const firstJobDefined = Boolean(group.jobs?.[0]); const firstJobDefined = Boolean(group.jobs?.[0]);
if (!firstJobDefined) { if (!firstJobDefined) {
const currentGroup = this.groups.find((element) => element.name === group.name); reportToSentry('stage_column_component', 'undefined_job_hunt');
const serializedGroup = Object.entries(currentGroup).join(' ');
reportToSentry(
'stage_column_component',
`undefined_job_hunt, serialized group: ${serializedGroup}`,
);
} }
return group.size === 1 && firstJobDefined; return group.size === 1 && firstJobDefined;
......
import { reportToSentry } from '../utils';
const unwrapGroups = (stages) => { const unwrapGroups = (stages) => {
return stages.map((stage) => { return stages.map((stage) => {
const { const {
...@@ -8,6 +10,10 @@ const unwrapGroups = (stages) => { ...@@ -8,6 +10,10 @@ const unwrapGroups = (stages) => {
}; };
const unwrapNodesWithName = (jobArray, prop, field = 'name') => { const unwrapNodesWithName = (jobArray, prop, field = 'name') => {
if (jobArray.length < 1) {
reportToSentry('unwrapping_utils', 'undefined_job_hunt, array empty from backend');
}
return jobArray.map((job) => { return jobArray.map((job) => {
return { ...job, [prop]: job[prop].nodes.map((item) => item[field] || '') }; return { ...job, [prop]: job[prop].nodes.map((item) => item[field] || '') };
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment