This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jira Worklogs + Summary with Original Estimate | |
// | |
/* | |
Jira Worklogs + Estimates Sync | |
Purpose: | |
- Sync Jira worklogs into Postgres and build a per issue time summary with Original Estimate. | |
Selection: | |
- Processes only completed issues | |
- Applies a grace window (COMPLETED_GRACE_DAYS) | |
- Skips issues already snapshotted unless OVERWRITE_SUMMARY=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* deployment_backfill_run.js | |
* | |
* Reads deployments from a CSV file and posts them to the DX Deployments API. | |
* Supports --dry-run to preview the first 10 records only (no API calls). | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); | |
const csv = require('csv-parser'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* fetch_work_item_parents.js | |
* | |
* Backfill: WorkItemLinks WIQL, partitioned by Source.ChangedDate windows using DATE precision (YYYY-MM-DD) | |
* Incremental: WorkItems WIQL by ChangedDate with DATE precision filter (YYYY-MM-DD) | |
* Writes: batched multi row upserts into custom.ado_work_item_links | |
* Schema columns used: child_work_item_source_id, parent_work_item_source_id, relation_url | |
* MIN_ID applied to both parent and child | |
* Direct ADO HTTPS without DX proxy | |
* Dry run writes a SQL file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enrich_duo_csv.js | |
// CommonJS version. Only env var required: DATABASE_URL | |
const fs = require("fs"); | |
const { parse } = require("csv-parse"); | |
const { stringify } = require("csv-stringify"); | |
const { Pool } = require("pg"); | |
const DATABASE_URL = process.env.DATABASE_URL; | |
if (!DATABASE_URL) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetch ADO custom field "Classification" for Work Items and upsert into DX. | |
* Usage: node fetch_classification.js | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); | |
const { Client } = require('pg'); | |
const axios = require('axios'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jira Worklogs + Summary with Original Estimate | |
// | |
/* | |
Jira Worklogs + Estimates Sync | |
Purpose: | |
- Sync Jira worklogs into Postgres and build a per issue time summary with Original Estimate. | |
Selection: | |
- Processes only completed issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* fetch_work_item_parents.incremental.js | |
* | |
* Purpose: Incremental-only importer of ADO parent-child links into DX. | |
* Uses a per-project watermark based on ADO System.ChangedDate to avoid gaps and duplicates. | |
* | |
* Writes: batched multi-row upserts into custom.ado_work_item_links | |
* Watermarks: custom.ado_wi_links_watermarks (organization_name, project_name, last_changed_at) | |
* | |
* Schema columns used in links table: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* fetch_work_item_parents.js | |
* | |
* Backfill: WorkItemLinks WIQL, partitioned by Source.ChangedDate windows using DATE precision (YYYY-MM-DD) | |
* Incremental: WorkItems WIQL by ChangedDate, then workitemsbatch expand=Relations | |
* Writes: batched multi row upserts into custom.ado_work_item_links | |
* Schema columns used: child_work_item_source_id, parent_work_item_source_id, relation_url | |
* MIN_ID applied to both parent and child | |
* ADO HTTPS via http://DX_PROXY_USER:[email protected]:80 | |
* Dry run writes a SQL file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module CustomerScripts | |
class accountIncidentImport | |
extend Callable | |
def call | |
results = unprocessed_issues | |
if results.empty? |
NewerOlder