Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const backfill_has_parent_in_project = async (c: Pick<Context<EmitterWebh
if (!project) {
continue;
}
c.log.info('processing project', project);
const fieldId = project.hasParentInProjectFieldId;
if (!fieldId) {
continue;
Expand All @@ -43,10 +44,14 @@ export const backfill_has_parent_in_project = async (c: Pick<Context<EmitterWebh
pageInfo.endCursor = search.pageInfo.endCursor
pageInfo.hasNextPage = search.pageInfo.hasNextPage
for (let issue of search.nodes) {
const issueProjectItem = issue.projectItems && issue.projectItems.nodes && issue.projectItems.nodes.find((pr: any) => (pr.project.id === project.projectId))
if (!issue.parent) {
continue;
}
const issueProjectItem = issue.projectItems && issue.projectItems.nodes && issue.projectItems.nodes.find((pr: any) => (pr.project.id === project.projectId))

if (issueProjectItem.isArchived || issueProjectItem.type !== "ISSUE") {
continue;
}

const parentProjectItem = issue.parent && issue.parent.projectItems && issue.parent.projectItems.nodes.find((pr: any) => (pr.project.id === project.projectId));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const sub_issues_parent_issue_added_listener = async (context: EmitterWeb
continue;
}

if (projectItem.type !== 'Issue') {
if (projectItem.type !== 'ISSUE') {
context.log.info("Skip because item is type is not an issue");
continue;
}
Expand Down Expand Up @@ -65,7 +65,7 @@ export const sub_issues_parent_issue_removed_listener = async (context: EmitterW
continue;
}

if (projectItem.type !== 'Issue') {
if (projectItem.type !== 'ISSUE') {
context.log.info("Skip because item is type is not an issue");
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions src/shared/project_ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const BILLING: ProductDeliveryTeamProject = {
createdAtFieldId: 'PVTF_lADOBKF3Cs4Ak7J2zgq6L7Q',
updatedAtFieldId: 'PVTF_lADOBKF3Cs4Ak7J2zgq6L-I',
closedAtFieldId: 'PVTF_lADOBKF3Cs4Ak7J2zgq6MB0',
hasParentInProjectFieldId: 'PVTF_lADOBKF3Cs4Ak7J2zgdDpVU',
hasParentInProjectFieldId: 'PVTF_lADOBKF3Cs4Ak7J2zgsrPgI',
}

// project id: 87
Expand Down Expand Up @@ -392,7 +392,7 @@ export const QA: ProductDeliveryTeamProject = {
createdAtFieldId: 'PVTF_lADOBKF3Cs4Al5CBzgq6Veg',
updatedAtFieldId: 'PVTF_lADOBKF3Cs4Al5CBzgq6Vgc',
closedAtFieldId: 'PVTF_lADOBKF3Cs4Al5CBzgq6Vlc',
hasParentInProjectFieldId: 'PVTF_lADOBKF3Cs4Al5CBzgsrLvA',
hasParentInProjectFieldId: 'PVTF_lADOBKF3Cs4Al5CBzgssQA8',
}


Expand Down