Skip to content

Backend/Enhc/updateKaptureTicket#1192

Merged
0utkarsh merged 1 commit intomainfrom
backend/enhc/updateKaptureTicket
Mar 30, 2026
Merged

Backend/Enhc/updateKaptureTicket#1192
0utkarsh merged 1 commit intomainfrom
backend/enhc/updateKaptureTicket

Conversation

@kumararnab11
Copy link
Copy Markdown
Contributor

@kumararnab11 kumararnab11 commented Mar 26, 2026

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

Description

Additional Changes

  • This PR modifies the database schema (database migration added)
  • This PR modifies dhall configs/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code and addressed linter errors ./dev/format-all-files.sh
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

Summary by CodeRabbit

  • New Features
    • Ticket updates now include ride description information to provide better context for ride-related issues.
    • Ticket updates support detailed issue metadata—descriptions, issue IDs, media attachments, sub-category and vehicle/category tags—for richer documentation and tracking.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 33d3bcab-9dfd-4dd1-b677-b2cf62591748

📥 Commits

Reviewing files that changed from the base of the PR and between 3d71688 and a503ba2.

📒 Files selected for processing (3)
  • lib/mobility-core/src/Kernel/External/Ticket/Interface/Kapture.hs
  • lib/mobility-core/src/Kernel/External/Ticket/Interface/Types.hs
  • lib/mobility-core/src/Kernel/External/Ticket/Kapture/Types.hs
✅ Files skipped from review due to trivial changes (1)
  • lib/mobility-core/src/Kernel/External/Ticket/Kapture/Types.hs
🚧 Files skipped from review as they are similar to previous changes (2)
  • lib/mobility-core/src/Kernel/External/Ticket/Interface/Kapture.hs
  • lib/mobility-core/src/Kernel/External/Ticket/Interface/Types.hs

Walkthrough

Adds optional rideDescription and issueDetails fields to UpdateTicketReq across interface and Kapture layers, introduces a new UpdateIssueDetails type, and adds an adapter to convert incoming issue detail records into Kapture's UpdateIssueDetails.

Changes

Cohort / File(s) Summary
Core Type Definitions
lib/mobility-core/src/Kernel/External/Ticket/Interface/Types.hs
Added UpdateIssueDetails record with optional fields (issueDescription, issueId, mediaFiles, subCategory, vehicleCategory, category). Extended UpdateTicketReq to include rideDescription :: Maybe RideInfo and issueDetails :: Maybe UpdateIssueDetails.
Kapture Integration / Adapter
lib/mobility-core/src/Kernel/External/Ticket/Interface/Kapture.hs
mkUpdateTicketReq now sets rideDetails (via mkRideDescriptionDriver <$> rideDescription) and issueDetails (via mkUpdateIssueDetails <$> issueDetails). Added mkUpdateIssueDetails :: IT.UpdateIssueDetails -> Kapture.UpdateIssueDetails that maps fields directly.
Kapture Type Serialization
lib/mobility-core/src/Kernel/External/Ticket/Kapture/Types.hs
Introduced UpdateIssueDetails type and ToJSON instance; extended Kapture's UpdateTicketReq to include rideDetails and issueDetails for JSON serialization (snake_case).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰
I hopped through types and fields today,
Adding notes for rides and disarray,
I stitched adapters, neat and small,
So Kapture hears the ticket call,
Hooray — more data for one and all!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Backend/Enhc/updateKaptureTicket' is vague and uses branch naming conventions rather than describing the actual changes made. Use a clear, descriptive title that summarizes the main change, such as 'Add ride and issue details fields to Kapture ticket updates' or 'Enhance Kapture UpdateTicketReq with additional fields'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backend/enhc/updateKaptureTicket

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kumararnab11 kumararnab11 force-pushed the backend/enhc/updateKaptureTicket branch from 3d71688 to a503ba2 Compare March 30, 2026 12:48
@0utkarsh 0utkarsh merged commit 929843e into main Mar 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants