"""Mock Jira tickets — Tata Steel scenario, Feb 10 – Mar 20 2026.

Tickets mirror the email storylines and show status evolution across days:
  A) Coking coal supply delay → BF#3 production risk
  B) Die casting line #2 downtime → vendor procurement
  C) Iron ore fill rate investigation → fix
  D) Safety incident RCA
  E) Enterprise Brain project tasks
  F) Client SLA / delivery issue
  G) Q2 capacity planning
"""

TICKETS = [
    # ── Storyline A: Coking coal / BF#3 ────────────────────────────────────
    {
        "id": "TS-101",
        "type": "Bug",
        "status": "Done",
        "priority": "Critical",
        "summary": "BF#3 feed schedule not updated after coal supply delay",
        "assignee": "manisha.g@tatasteel.com",
        "reporter": "rajesh.kumar@tatasteel.com",
        "created": "2026-02-11",
        "updated": "2026-02-13",
        "description": (
            "Production planning system still shows original Feb 28 feed date for BF#3. "
            "Needs to reflect the 12-day coal delay (PO #TS-4521). "
            "Risk: furnace may run short if not updated."
        ),
        "snippet": "BF#3 feed schedule stale after 12-day coal delay. Fixed Feb 13.",
        "project": "bf3-coal-supply",
        "labels": ["blast-furnace", "production-planning", "coal"],
    },
    {
        "id": "TS-102",
        "type": "Task",
        "status": "Done",
        "priority": "High",
        "summary": "Source spot coal — bridge BF#3 supply gap (5,000 MT)",
        "assignee": "rajesh.kumar@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-02-13",
        "updated": "2026-02-20",
        "description": (
            "Naveen requested spot sourcing options from NMDC or Coal India "
            "to bridge the BF#3 supply gap until PO #TS-4521 arrives. "
            "Target: 5,000 MT at market rate. Evaluate and recommend by Feb 16."
        ),
        "snippet": "Spot coal sourcing (5,000 MT) to bridge BF#3 gap. Completed Feb 20.",
        "project": "bf3-coal-supply",
        "labels": ["procurement", "coal", "blast-furnace", "spot-buy"],
    },
    {
        "id": "TS-103",
        "type": "Task",
        "status": "In Progress",
        "priority": "High",
        "summary": "Develop BF#3 standing contingency plan for supply disruptions",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-03-12",
        "updated": "2026-03-15",
        "description": (
            "Post Maruti Suzuki escalation, Naveen requested a permanent contingency plan "
            "for BF#3 supply disruptions: minimum buffer stock levels, approved spot suppliers, "
            "and escalation triggers. Due before Q2 board review."
        ),
        "snippet": "BF#3 contingency plan (buffer stock, spot suppliers, escalation triggers). In progress, due before Q2 board review.",
        "project": "bf3-coal-supply",
        "labels": ["blast-furnace", "contingency", "planning", "q2"],
    },

    # ── Storyline B: Die casting downtime ───────────────────────────────────
    {
        "id": "TS-104",
        "type": "Task",
        "status": "Done",
        "priority": "Critical",
        "summary": "Procure replacement hydraulic pump — Die Casting Line #2",
        "assignee": "rajesh.kumar@tatasteel.com",
        "reporter": "vijay.kamineni@tatasteel.com",
        "created": "2026-02-14",
        "updated": "2026-02-19",
        "description": (
            "Die Casting Line #2 down due to hydraulic pump failure. "
            "Bosch Rexroth contacted — quote received: ₹3,42,000, 5 business days delivery. "
            "Raise PO urgently. Vijay's approval obtained on Feb 17."
        ),
        "snippet": "Emergency pump procurement (₹3,42,000, Bosch Rexroth). PO raised Feb 17 after Vijay approval. Done.",
        "project": "die-casting-maintenance",
        "labels": ["maintenance", "die-casting", "procurement", "emergency"],
    },
    {
        "id": "TS-105",
        "type": "Task",
        "status": "Done",
        "priority": "High",
        "summary": "Install hydraulic pump and restore Die Casting Line #2",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "vijay.kamineni@tatasteel.com",
        "created": "2026-02-19",
        "updated": "2026-03-14",
        "description": (
            "Pump arrived Feb 24. Installation completed by maintenance crew. "
            "Line #2 fully restored and back to normal production on Mar 14."
        ),
        "snippet": "Pump installed, Line #2 fully restored Mar 14.",
        "project": "die-casting-maintenance",
        "labels": ["maintenance", "die-casting", "installation"],
    },
    {
        "id": "TS-106",
        "type": "Story",
        "status": "To Do",
        "priority": "Medium",
        "summary": "Implement predictive maintenance alerting for Die Casting hydraulic systems",
        "assignee": "manisha.g@tatasteel.com",
        "reporter": "vijay.kamineni@tatasteel.com",
        "created": "2026-03-15",
        "updated": "2026-03-15",
        "description": (
            "Following the Line #2 unplanned downtime, set up sensor-based alerting "
            "for hydraulic pressure anomalies on all three die casting lines. "
            "Alert threshold: >10% deviation from 72-hr baseline."
        ),
        "snippet": "Sensor-based hydraulic pressure alerts for all 3 die casting lines. Not started.",
        "project": "die-casting-maintenance",
        "labels": ["maintenance", "predictive", "die-casting", "monitoring"],
    },

    # ── Storyline C: Iron ore fill rate ──────────────────────────────────────
    {
        "id": "TS-107",
        "type": "Bug",
        "status": "Done",
        "priority": "Medium",
        "summary": "Iron ore fill rate drop 2.3% — Jamshedpur plant (J-047)",
        "assignee": "manisha.g@tatasteel.com",
        "reporter": "ops-monitoring@tatasteel.com",
        "created": "2026-02-21",
        "updated": "2026-02-25",
        "description": (
            "Automated monitoring flagged 2.3% drop in iron ore fill rate at Jamshedpur. "
            "Root cause: worn mesh on screening deck #3, unit J-047. "
            "Mesh replaced during Feb 25 maintenance window. Fill rate restored to 94.1%."
        ),
        "snippet": "Fill rate drop (91.7%) at J-047 — worn mesh. Fixed Feb 25, back to 94.1%.",
        "project": "iron-ore-ops",
        "labels": ["operations", "iron-ore", "fill-rate", "jamshedpur"],
    },

    # ── Storyline D: Safety incident ─────────────────────────────────────────
    {
        "id": "TS-108",
        "type": "Task",
        "status": "Done",
        "priority": "Critical",
        "summary": "Emergency crane cable replacement — Hot Strip Mill (SR-2026-0089)",
        "assignee": "safety@tatasteel.com",
        "reporter": "safety@tatasteel.com",
        "created": "2026-03-05",
        "updated": "2026-03-05",
        "description": (
            "Frayed overhead crane cable found during pre-shift inspection at Hot Strip Mill. "
            "4-hour halt. Cable replaced. Operations resumed. No injuries."
        ),
        "snippet": "Frayed crane cable at Hot Strip Mill — 4hr halt, cable replaced, no injuries. Done.",
        "project": "safety-compliance",
        "labels": ["safety", "maintenance", "hot-strip-mill", "near-miss"],
    },
    {
        "id": "TS-109",
        "type": "Task",
        "status": "In Progress",
        "priority": "High",
        "summary": "Full crane inspection — Jamshedpur and Kalinganagar (post SR-2026-0089)",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-03-06",
        "updated": "2026-03-14",
        "description": (
            "Naveen requested full inspection of all overhead cranes at both plants by Mar 9. "
            "Jamshedpur: 12/14 cranes inspected, 2 pending (scheduled Mar 16). "
            "Kalinganagar: 8/8 complete, no issues found."
        ),
        "snippet": "Crane inspection: Jamshedpur 12/14 done (2 pending Mar 16), Kalinganagar 8/8 clear.",
        "project": "safety-compliance",
        "labels": ["safety", "inspection", "jamshedpur", "kalinganagar"],
    },
    {
        "id": "TS-110",
        "type": "Task",
        "status": "In Progress",
        "priority": "High",
        "summary": "RCA report for crane near-miss — due Safety Committee Mar 10",
        "assignee": "manisha.g@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-03-06",
        "updated": "2026-03-12",
        "description": (
            "Full root cause analysis for incident SR-2026-0089. "
            "Contributing factors identified: last preventive maintenance was 14 months ago (overdue by 2 months). "
            "RCA draft ready — pending review by Safety Director before submission."
        ),
        "snippet": "RCA for SR-2026-0089: PM overdue by 2 months. Draft ready, pending Safety Director review.",
        "project": "safety-compliance",
        "labels": ["safety", "rca", "hot-strip-mill"],
    },

    # ── Storyline E: Enterprise Brain ────────────────────────────────────────
    {
        "id": "TS-111",
        "type": "Story",
        "status": "Done",
        "priority": "High",
        "summary": "Enterprise Brain: Gmail and Jira data agents live in staging",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "prathima.inolu@divami.com",
        "created": "2026-02-25",
        "updated": "2026-03-03",
        "description": (
            "Gmail data agent (email search + read) and Jira data agent (JQL + search) "
            "deployed to staging environment. Chanakya hub agent integrating both. "
            "Acceptance sign-off by Vijay."
        ),
        "snippet": "Gmail + Jira agents live in staging, Chanakya integration complete. Vijay signed off.",
        "project": "enterprise-brain",
        "labels": ["enterprise-brain", "staging", "data-agent"],
    },
    {
        "id": "TS-112",
        "type": "Task",
        "status": "In Progress",
        "priority": "High",
        "summary": "Raise Oracle Unifier staging credentials with IT — ticket IT-2890",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "prathima.inolu@divami.com",
        "created": "2026-03-04",
        "updated": "2026-03-10",
        "description": (
            "IT ticket IT-2890 raised for Oracle Unifier staging access. "
            "Expected resolution: 5 business days from Mar 4. "
            "Escalated on Mar 10 — IT team says access provisioning delayed due to vendor contact."
        ),
        "snippet": "Oracle Unifier staging access (IT-2890) — escalated Mar 10, still blocked on vendor contact.",
        "project": "enterprise-brain",
        "labels": ["enterprise-brain", "oracle-unifier", "it", "blocked"],
    },
    {
        "id": "TS-113",
        "type": "Story",
        "status": "To Do",
        "priority": "High",
        "summary": "Enterprise Brain: Schedule and prepare Mar 20 demo for Tata Steel leadership",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-03-08",
        "updated": "2026-03-08",
        "description": (
            "Prepare demo environment, demo script, and attendee list for Mar 20. "
            "Naveen and finance team to attend. Focus: Gmail/Jira query, dynamic dashboard, "
            "and upcoming RT agent capabilities."
        ),
        "snippet": "Mar 20 leadership demo prep: environment, script, attendees (Naveen + finance). Not started.",
        "project": "enterprise-brain",
        "labels": ["enterprise-brain", "demo", "leadership"],
    },

    # ── Storyline F: Client delivery / Maruti ────────────────────────────────
    {
        "id": "TS-114",
        "type": "Bug",
        "status": "Done",
        "priority": "High",
        "summary": "HRC delivery to Maruti Suzuki delayed 7 days — Order #MS-7821",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "client.relations@tatasteelprocessing.com",
        "created": "2026-03-10",
        "updated": "2026-03-12",
        "description": (
            "Maruti Suzuki Order #MS-7821 delivered Mar 7 vs committed Feb 28. "
            "Root cause: BF#3 at 85% capacity during coal gap. "
            "Resolution: ₹12L credit note issued on Mar 12 (Naveen approved). "
            "SLA commitment letter sent to Maruti procurement head."
        ),
        "snippet": "Maruti #MS-7821 delivered 7 days late (BF#3 coal gap). ₹12L credit note issued Mar 12, SLA letter sent.",
        "project": "client-delivery",
        "labels": ["client", "delivery", "maruti", "sla", "hrc"],
    },

    # ── Storyline G: Q2 capacity planning ────────────────────────────────────
    {
        "id": "TS-115",
        "type": "Task",
        "status": "Done",
        "priority": "Medium",
        "summary": "Compile Q2 capacity inputs for board review — Mar 14 deadline",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-03-08",
        "updated": "2026-03-13",
        "description": (
            "Submitted Mar 13. Summary: HRC 98%, CRC 94%, Long Products 100%. "
            "Key risk flagged: BF#3 at 85% until coal arrives (~Mar 18). "
            "Two open senior operator roles in Jamshedpur — won't affect output if filled by Apr 15."
        ),
        "snippet": "Q2 inputs submitted Mar 13: HRC 98%, CRC 94%, LP 100%. Risk: BF#3 at 85% until Mar 18.",
        "project": "q2-capacity-planning",
        "labels": ["planning", "q2", "capacity", "board"],
    },
    {
        "id": "TS-116",
        "type": "Task",
        "status": "To Do",
        "priority": "Medium",
        "summary": "Fill 2 senior operator vacancies — Jamshedpur plant (Q2 risk)",
        "assignee": "manisha.g@tatasteel.com",
        "reporter": "vijay.kamineni@tatasteel.com",
        "created": "2026-03-13",
        "updated": "2026-03-13",
        "description": (
            "Two senior operator roles open at Jamshedpur. Must be filled by Apr 15 "
            "to avoid Q2 throughput risk. Coordinate with HR to fast-track JD and interviews."
        ),
        "snippet": "2 senior operator roles open at Jamshedpur — fill by Apr 15 to avoid Q2 throughput risk.",
        "project": "q2-capacity-planning",
        "labels": ["hr", "hiring", "jamshedpur", "q2"],
    },

    # ── General monitoring / analyst work ────────────────────────────────────
    {
        "id": "TS-117",
        "type": "Task",
        "status": "Done",
        "priority": "Low",
        "summary": "Set up daily throughput monitoring dashboard for Die Casting lines",
        "assignee": "manisha.g@tatasteel.com",
        "reporter": "manisha.g@tatasteel.com",
        "created": "2026-02-16",
        "updated": "2026-02-20",
        "description": (
            "Created daily ops tracking for Lines #1, #2, #4 throughput vs baseline. "
            "Threshold alerts at 18% deviation. First used during Line #2 downtime Feb 14."
        ),
        "snippet": "Daily throughput dashboard live for Lines #1/#2/#4, 18% deviation alerts. Done.",
        "project": "die-casting-maintenance",
        "labels": ["monitoring", "die-casting", "ops-tooling"],
    },
    {
        "id": "TS-118",
        "type": "Task",
        "status": "In Progress",
        "priority": "Medium",
        "summary": "12-month preventive maintenance calendar — all overhead cranes",
        "assignee": "vijay.kamineni@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-03-06",
        "updated": "2026-03-16",
        "description": (
            "Naveen requested a 12-month PM calendar for all overhead cranes at Jamshedpur "
            "and Kalinganagar post incident SR-2026-0089. "
            "Draft complete — pending Safety Director approval before submission to board."
        ),
        "snippet": "12-month crane PM calendar drafted — pending Safety Director approval for board submission.",
        "project": "safety-compliance",
        "labels": ["safety", "maintenance", "planning", "crane"],
    },
    {
        "id": "TS-119",
        "type": "Bug",
        "status": "Open",
        "priority": "Medium",
        "summary": "Production planning system shows stale BF#3 schedule after coal update",
        "assignee": "manisha.g@tatasteel.com",
        "reporter": "manisha.g@tatasteel.com",
        "created": "2026-03-14",
        "updated": "2026-03-15",
        "description": (
            "After TS-101 was resolved, the production planning system was updated manually. "
            "However, it reverted to the old schedule after a system sync on Mar 13. "
            "Root cause: sync job overwrites manual entries. "
            "Needs a permanent fix in the sync logic."
        ),
        "snippet": "BF#3 schedule reverted after Mar 13 sync — sync job overwrites manual entries. Needs permanent fix.",
        "project": "bf3-coal-supply",
        "labels": ["production-planning", "bug", "blast-furnace"],
    },
    {
        "id": "TS-120",
        "type": "Task",
        "status": "To Do",
        "priority": "High",
        "summary": "Procure NMDC spot coal — evaluate as dual-source for Q2",
        "assignee": "rajesh.kumar@tatasteel.com",
        "reporter": "naveen.p@tatasteel.com",
        "created": "2026-03-12",
        "updated": "2026-03-13",
        "description": (
            "Naveen approved Rajesh's recommendation to evaluate NMDC as a dual-source supplier "
            "for coal. Request for quote sent to NMDC on Mar 12. "
            "Compare against JSW pricing and present options by Mar 18."
        ),
        "snippet": "NMDC dual-source evaluation approved. RFQ sent Mar 12 — compare vs JSW and present by Mar 18.",
        "project": "bf3-coal-supply",
        "labels": ["procurement", "coal", "nmdc", "dual-source", "q2"],
    },
]
